4 #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b)
8 + #if defined (__aarch64__)
10 + #elif defined (__x86_64__)
18 These INT_* (which stands for internal) macros should always be used when
19 the fakeroot library owns the storage of the stat variable.
20 @@ -1358,6 +1368,54 @@ int renameat(int olddir_fd, const char *
21 #endif /* HAVE_FSTATAT */
24 +#if defined(__GLIBC__) && __GLIBC_PREREQ(2,33)
25 +/* Glibc 2.33 exports symbols for these functions in the shared lib */
26 + int lstat(const char *file_name, struct stat *statbuf) {
27 + return WRAP_LSTAT LSTAT_ARG(_STAT_VER, file_name, statbuf);
29 + int stat(const char *file_name, struct stat *st) {
30 + return WRAP_STAT STAT_ARG(_STAT_VER, file_name, st);
32 + int fstat(int fd, struct stat *st) {
33 + return WRAP_FSTAT FSTAT_ARG(_STAT_VER, fd, st);
37 + int fstatat(int dir_fd, const char *path, struct stat *st, int flags) {
38 + return WRAP_FSTATAT FSTATAT_ARG(_STAT_VER, dir_fd, path, st, flags);
42 + #ifdef STAT64_SUPPORT
43 + int lstat64(const char *file_name, struct stat64 *st) {
44 + return WRAP_LSTAT64 LSTAT64_ARG(_STAT_VER, file_name, st);
46 + int stat64(const char *file_name, struct stat64 *st) {
47 + return WRAP_STAT64 STAT64_ARG(_STAT_VER, file_name, st);
49 + int fstat64(int fd, struct stat64 *st) {
50 + return WRAP_FSTAT64 FSTAT64_ARG(_STAT_VER, fd, st);
54 + int fstatat64(int dir_fd, const char *path, struct stat64 *st, int flags) {
55 + return WRAP_FSTATAT64 FSTATAT64_ARG(_STAT_VER, dir_fd, path, st, flags);
60 + int mknod(const char *pathname, mode_t mode, dev_t dev) {
61 + return WRAP_MKNOD MKNOD_ARG(_STAT_VER, pathname, mode, &dev);
64 + #if defined(HAVE_FSTATAT) && defined(HAVE_MKNODAT)
65 + int mknodat(int dir_fd, const char *pathname, mode_t mode, dev_t dev) {
66 + return WRAP_MKNODAT MKNODAT_ARG(_STAT_VER, dir_fd, pathname, mode, &dev);
69 +#endif /* GLIBC_PREREQ */
72 #ifdef FAKEROOT_FAKENET
75 @@ -2024,11 +2082,7 @@ FTSENT *fts_read(FTS *ftsp) {
76 || r->fts_info == FTS_NS || r->fts_info == FTS_NSOK))
77 r->fts_statp = NULL; /* Otherwise fts_statp may be a random pointer */
78 if(r && r->fts_statp) { /* Should we bother checking fts_info here? */
79 -# if defined(STAT64_SUPPORT) && !defined(__APPLE__)
80 - SEND_GET_STAT64(r->fts_statp, _STAT_VER);
82 SEND_GET_STAT(r->fts_statp, _STAT_VER);
87 @@ -2047,11 +2101,7 @@ FTSENT *fts_children(FTS *ftsp, int opti
88 first=next_fts_children(ftsp, options);
89 for(r = first; r; r = r->fts_link) {
90 if(r && r->fts_statp) { /* Should we bother checking fts_info here? */
91 -# if defined(STAT64_SUPPORT) && !defined(__APPLE__)
92 - SEND_GET_STAT64(r->fts_statp, _STAT_VER);
94 SEND_GET_STAT(r->fts_statp, _STAT_VER);
99 @@ -2483,7 +2533,7 @@ int statx (int dirfd, const char *path,
101 #ifdef LIBFAKEROOT_DEBUGGING
102 if (fakeroot_debug) {
103 - fprintf(stderr, "statx fd %d\n", fd);
104 + fprintf(stderr, "statx fd %d\n", dirfd);
106 #endif /* LIBFAKEROOT_DEBUGGING */
107 r=INT_NEXT_FSTATAT(dirfd, path, &st, flags);
110 @@ -184,13 +184,13 @@ AC_MSG_CHECKING([for type of arg of __xm
112 int __xmknod ( int ver,
113 const char *pathname ,
114 - mode_t mode , dev_t dev);
115 + mode_t mode , dev_t *dev);
117 - AC_DEFINE(XMKNOD_FRTH_ARG,)
118 - AC_MSG_RESULT([no extra *])
120 AC_DEFINE(XMKNOD_FRTH_ARG,[*])
121 AC_MSG_RESULT([needs *])
123 + AC_DEFINE(XMKNOD_FRTH_ARG,)
124 + AC_MSG_RESULT([no extra *])
128 @@ -211,13 +211,13 @@ AC_MSG_CHECKING([for type of arg of __xm
129 int __xmknodat ( int ver,
131 const char *pathname ,
132 - mode_t mode , dev_t dev);
133 + mode_t mode , dev_t *dev);
135 - AC_DEFINE(XMKNODAT_FIFTH_ARG,)
136 - AC_MSG_RESULT([no extra *])
138 AC_DEFINE(XMKNODAT_FIFTH_ARG,[*])
139 AC_MSG_RESULT([needs *])
141 + AC_DEFINE(XMKNODAT_FIFTH_ARG,)
142 + AC_MSG_RESULT([no extra *])