200bed5c06
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
137 lines
3 KiB
Diff
137 lines
3 KiB
Diff
--- a/fsck_hfs.tproj/dfalib/Scavenger.h
|
|
+++ b/fsck_hfs.tproj/dfalib/Scavenger.h
|
|
@@ -48,7 +48,6 @@
|
|
#endif
|
|
#include <sys/errno.h>
|
|
#include <sys/param.h>
|
|
-#include <sys/sysctl.h>
|
|
#include <sys/mount.h>
|
|
#include <hfs/hfs_mount.h>
|
|
|
|
--- a/fsck_hfs.tproj/fsck_hfs.c
|
|
+++ b/fsck_hfs.tproj/fsck_hfs.c
|
|
@@ -30,7 +30,6 @@
|
|
#include <sys/ioctl.h>
|
|
#if !LINUX
|
|
#include <sys/disk.h>
|
|
-#include <sys/sysctl.h>
|
|
#include <setjmp.h>
|
|
#endif
|
|
#include <hfs/hfs_mount.h>
|
|
--- a/newfs_hfs.tproj/makehfs.c
|
|
+++ b/newfs_hfs.tproj/makehfs.c
|
|
@@ -38,7 +38,6 @@
|
|
#endif
|
|
#include <sys/errno.h>
|
|
#include <sys/stat.h>
|
|
-#include <sys/sysctl.h>
|
|
#if !LINUX
|
|
#include <sys/vmmeter.h>
|
|
#endif
|
|
--- a/fsck_hfs.tproj/utilities.c
|
|
+++ b/fsck_hfs.tproj/utilities.c
|
|
@@ -70,7 +70,6 @@
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
-#include <sys/sysctl.h>
|
|
|
|
#include "fsck_hfs.h"
|
|
|
|
--- a/fsck_hfs.tproj/dfalib/Scavenger.h
|
|
+++ b/fsck_hfs.tproj/dfalib/Scavenger.h
|
|
@@ -46,7 +46,7 @@
|
|
#include <sys/kauth.h>
|
|
#include <sys/syslimits.h>
|
|
#endif
|
|
-#include <sys/errno.h>
|
|
+#include <errno.h>
|
|
#include <sys/param.h>
|
|
#include <sys/mount.h>
|
|
#include <hfs/hfs_mount.h>
|
|
--- a/fsck_hfs.tproj/utilities.c
|
|
+++ b/fsck_hfs.tproj/utilities.c
|
|
@@ -55,7 +55,7 @@
|
|
#include <stddef.h>
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
-#include <sys/errno.h>
|
|
+#include <errno.h>
|
|
#if LINUX
|
|
#include <limits.h>
|
|
#include <signal.h>
|
|
--- a/newfs_hfs.tproj/makehfs.c
|
|
+++ b/newfs_hfs.tproj/makehfs.c
|
|
@@ -36,7 +36,7 @@
|
|
#include <time.h>
|
|
#include "missing.h"
|
|
#endif
|
|
-#include <sys/errno.h>
|
|
+#include <errno.h>
|
|
#include <sys/stat.h>
|
|
#if !LINUX
|
|
#include <sys/vmmeter.h>
|
|
--- a/fsck_hfs.tproj/cache.h
|
|
+++ b/fsck_hfs.tproj/cache.h
|
|
@@ -29,6 +29,7 @@
|
|
#ifndef _CACHE_H_
|
|
#define _CACHE_H_
|
|
#include <stdint.h>
|
|
+#include <sys/types.h>
|
|
|
|
/* Different values for initializing cache */
|
|
enum {
|
|
--- a/newfs_hfs.tproj/makehfs.c
|
|
+++ b/newfs_hfs.tproj/makehfs.c
|
|
@@ -41,6 +41,7 @@
|
|
#if !LINUX
|
|
#include <sys/vmmeter.h>
|
|
#endif
|
|
+#include <sys/cdefs.h>
|
|
|
|
#include <err.h>
|
|
#include <errno.h>
|
|
--- a/newfs_hfs.tproj/newfs_hfs.c
|
|
+++ b/newfs_hfs.tproj/newfs_hfs.c
|
|
@@ -42,6 +42,7 @@
|
|
#if LINUX
|
|
#include <time.h>
|
|
#endif
|
|
+#include <sys/cdefs.h>
|
|
|
|
#if !LINUX
|
|
#include <IOKit/storage/IOMediaBSDClient.h>
|
|
--- a/fsck_hfs.tproj/fsck_hfs.h
|
|
+++ b/fsck_hfs.tproj/fsck_hfs.h
|
|
@@ -22,6 +22,7 @@
|
|
*/
|
|
|
|
#include "cache.h"
|
|
+#include <sys/cdefs.h>
|
|
|
|
|
|
const extern char *cdevname; /* name of device being checked */
|
|
--- a/fsck_hfs.tproj/utilities.c
|
|
+++ b/fsck_hfs.tproj/utilities.c
|
|
@@ -785,7 +785,7 @@
|
|
|
|
if (!live_fsck) {
|
|
/* copy va_list as it will be used again later */
|
|
- __va_copy(ap_stdout, ap);
|
|
+ va_copy(ap_stdout, ap);
|
|
vfprintf(stdout, fmt, ap_stdout);
|
|
}
|
|
|
|
--- a/fsck_hfs.tproj/fsck_messages.c
|
|
+++ b/fsck_hfs.tproj/fsck_messages.c
|
|
@@ -85,7 +85,7 @@
|
|
|
|
if (c == NULL)
|
|
return;
|
|
- __va_copy(ap2, ap); // Just in case we need it
|
|
+ va_copy(ap2, ap); // Just in case we need it
|
|
length = vsnprintf(buf, BUFSIZ, fmt, ap);
|
|
if (length > BUFSIZ) {
|
|
// We need to allocate space for it
|
|
|
|
|