tools/expat: update to 2.4.6
[openwrt/staging/dedeckeh.git] / tools / fakeroot / patches / 500-macos_arm64_compile_fix.patch
1 --- a/communicate.c
2 +++ b/communicate.c
3 @@ -24,7 +24,12 @@
4 In this file, we want 'struct stat' to have a 32-bit 'ino_t'.
5 We use 'struct stat64' when we need a 64-bit 'ino_t'.
6 */
7 -#define _DARWIN_NO_64_BIT_INODE
8 +# include <sys/types.h>
9 +# if __DARWIN_ONLY_64_BIT_INO_T
10 +# define _DARWIN_USE_64_BIT_INODE
11 +# else
12 +# define _DARWIN_NO_64_BIT_INODE
13 +# endif
14 #endif
15
16 #include "communicate.h"
17 --- a/communicate.h
18 +++ b/communicate.h
19 @@ -91,6 +91,10 @@
20 # include <inttypes.h>
21 #endif
22
23 +#if __DARWIN_ONLY_64_BIT_INO_T
24 +struct stat64 __DARWIN_STRUCT_STAT64;
25 +#endif
26 +
27 #ifndef FAKEROOT_FAKENET
28 # define FAKEROOTKEY_ENV "FAKEROOTKEY"
29 #endif /* ! FAKEROOT_FAKENET */
30 --- a/faked.c
31 +++ b/faked.c
32 @@ -84,7 +84,12 @@
33 In this file, we want 'struct stat' to have a 32-bit 'ino_t'.
34 We use 'struct stat64' when we need a 64-bit 'ino_t'.
35 */
36 -#define _DARWIN_NO_64_BIT_INODE
37 +# include <sys/types.h>
38 +# if __DARWIN_ONLY_64_BIT_INO_T
39 +# define _DARWIN_USE_64_BIT_INODE
40 +# else
41 +# define _DARWIN_NO_64_BIT_INODE
42 +# endif
43 #endif
44
45 #include "config.h"
46 --- a/libfakeroot.c
47 +++ b/libfakeroot.c
48 @@ -38,7 +38,12 @@
49 In this file, we want 'struct stat' to have a 32-bit 'ino_t'.
50 We use 'struct stat64' when we need a 64-bit 'ino_t'.
51 */
52 -#define _DARWIN_NO_64_BIT_INODE
53 +# include <sys/types.h>
54 +# if __DARWIN_ONLY_64_BIT_INO_T
55 +# define _DARWIN_USE_64_BIT_INODE
56 +# else
57 +# define _DARWIN_NO_64_BIT_INODE
58 +# endif
59
60 /* The helper _unix2003 version of this file calls a few functions in this file
61 that are marked with static_nonapple so that needs to become private instead
62 --- a/libfakeroot_unix2003.c
63 +++ b/libfakeroot_unix2003.c
64 @@ -18,7 +18,11 @@
65 In this file, we want 'struct stat' to have a 32-bit 'ino_t'.
66 We use 'struct stat64' when we need a 64-bit 'ino_t'.
67 */
68 -#define _DARWIN_NO_64_BIT_INODE
69 +# if __DARWIN_ONLY_64_BIT_INO_T
70 +# define _DARWIN_USE_64_BIT_INODE
71 +# else
72 +# define _DARWIN_NO_64_BIT_INODE
73 +# endif
74
75 /*
76 This file is for 32-bit symbols which have the "$UNIX2003" version, i.e.
77 --- a/libfakeroot_inode64.c
78 +++ b/libfakeroot_inode64.c
79 @@ -25,7 +25,7 @@
80 #include "config.h"
81 #include "communicate.h"
82
83 -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
84 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T
85
86 #include <stdio.h>
87 #include <spawn.h>
88 --- a/wrapfunc.inp
89 +++ b/wrapfunc.inp
90 @@ -48,9 +48,11 @@ getattrlist$UNIX2003;int;(const char *pa
91 #endif
92 #endif
93 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
94 +#if !__DARWIN_ONLY_64_BIT_INO_T
95 lstat$INODE64;int;(const char *file_name, struct stat *buf);(file_name, buf)
96 stat$INODE64;int;(const char *file_name, struct stat *buf);(file_name, buf)
97 fstat$INODE64;int;(int fd, struct stat *buf);(fd, buf)
98 +#endif
99 posix_spawn;int;(pid_t * __restrict pid, const char * __restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t * __restrict attrp, char *const argv[ __restrict], char *const envp[ __restrict]);(pid, path, file_actions, attrp, argv, envp)
100 posix_spawnp;int;(pid_t * __restrict pid, const char * __restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t * __restrict attrp, char *const argv[ __restrict], char *const envp[ __restrict]);(pid, path, file_actions, attrp, argv, envp)
101 #endif
102 @@ -232,7 +234,7 @@ facl;int;(int fd, int cmd, int cnt, void
103 #ifdef HAVE_FTS_READ
104 fts_read;FTSENT *;(FTS *ftsp);(ftsp)
105 #ifdef __APPLE__
106 -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
107 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T
108 fts_read$INODE64;FTSENT *;(FTS *ftsp);(ftsp)
109 #endif
110 #endif /* ifdef __APPLE__ */
111 @@ -240,7 +242,7 @@ fts_read$INODE64;FTSENT *;(FTS *ftsp);(f
112 #ifdef HAVE_FTS_CHILDREN
113 fts_children;FTSENT *;(FTS *ftsp, int options);(ftsp, options)
114 #ifdef __APPLE__
115 -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
116 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T
117 fts_children$INODE64;FTSENT *;(FTS *ftsp, int options);(ftsp, options)
118 #endif
119 #endif /* ifdef __APPLE__ */