aboutsummaryrefslogtreecommitdiffstats
path: root/tools/fakeroot/patches/500-macos_arm64_compile_fix.patch
blob: a3731b9e995f4962a33229a34afd50bbe3f5ab2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
diff --git a/communicate.c b/communicate.c
index e2699a2..21e5366 100644
--- a/communicate.c
+++ b/communicate.c
@@ -24,7 +24,12 @@
    In this file, we want 'struct stat' to have a 32-bit 'ino_t'.
    We use 'struct stat64' when we need a 64-bit 'ino_t'.
 */
-#define _DARWIN_NO_64_BIT_INODE
+# include <sys/types.h>
+# if __DARWIN_ONLY_64_BIT_INO_T
+#  define _DARWIN_USE_64_BIT_INODE
+# else
+#  define _DARWIN_NO_64_BIT_INODE
+# endif
 #endif
 
 #include "communicate.h"
diff --git a/communicate.h b/communicate.h
index 3f9ca39..a586108 100644
--- a/communicate.h
+++ b/communicate.h
@@ -91,6 +91,10 @@
 # include <inttypes.h>
 #endif
 
+#if __DARWIN_ONLY_64_BIT_INO_T
+struct stat64 __DARWIN_STRUCT_STAT64;
+#endif
+
 #ifndef FAKEROOT_FAKENET
 # define FAKEROOTKEY_ENV          "FAKEROOTKEY"
 #endif /* ! FAKEROOT_FAKENET */
diff --git a/faked.c b/faked.c
index a970184..ea51a23 100644
--- a/faked.c
+++ b/faked.c
@@ -84,7 +84,12 @@
    In this file, we want 'struct stat' to have a 32-bit 'ino_t'.
    We use 'struct stat64' when we need a 64-bit 'ino_t'.
 */
-#define _DARWIN_NO_64_BIT_INODE
+# include <sys/types.h>
+# if __DARWIN_ONLY_64_BIT_INO_T
+#  define _DARWIN_USE_64_BIT_INODE
+# else
+#  define _DARWIN_NO_64_BIT_INODE
+# endif
 #endif
 
 #include "config.h"
diff --git a/libfakeroot.c b/libfakeroot.c
index c967d5d..836337d 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -38,7 +38,12 @@
    In this file, we want 'struct stat' to have a 32-bit 'ino_t'.
    We use 'struct stat64' when we need a 64-bit 'ino_t'.
 */
-#define _DARWIN_NO_64_BIT_INODE
+# include <sys/types.h>
+# if __DARWIN_ONLY_64_BIT_INO_T
+#  define _DARWIN_USE_64_BIT_INODE
+# else
+#  define _DARWIN_NO_64_BIT_INODE
+# endif
 
 /* The helper _unix2003 version of this file calls a few functions in this file
    that are marked with static_nonapple so that needs to become private instead
diff --git a/libfakeroot_unix2003.c b/libfakeroot_unix2003.c
index e1e19b6..f32bfec 100644
--- a/libfakeroot_unix2003.c
+++ b/libfakeroot_unix2003.c
@@ -18,7 +18,11 @@
    In this file, we want 'struct stat' to have a 32-bit 'ino_t'.
    We use 'struct stat64' when we need a 64-bit 'ino_t'.
 */
-#define _DARWIN_NO_64_BIT_INODE
+# if __DARWIN_ONLY_64_BIT_INO_T
+#  define _DARWIN_USE_64_BIT_INODE
+# else
+#  define _DARWIN_NO_64_BIT_INODE
+# endif
 
 /*
    This file is for 32-bit symbols which have the "$UNIX2003" version, i.e.