[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. 7688f1b398a9e71f239b1a7a6142a2d2d9f2beeb
Clint Adams
clint at debian.org
Tue Aug 23 13:12:55 UTC 2011
The following commit has been merged in the upstream branch:
commit b29bf23e062df6a6a1bdb6850db1f120b64539bd
Author: Kyle J. McKay <mackyle at gmail.com>
Date: Thu May 26 05:43:47 2011 -0700
For Mac OS X, only wrap fgetattrlist when present (10.6 or later)
diff --git a/configure.ac b/configure.ac
index 6261dfe..db1d01c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -274,7 +274,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
])
done
-AC_CHECK_FUNCS(fchmodat fchownat fstatat mkdirat mknodat openat renameat unlinkat lchmod)
+AC_CHECK_FUNCS(fchmodat fchownat fstatat mkdirat mknodat openat renameat unlinkat lchmod fgetattrlist)
dnl find out how stat() etc are called. On linux systems, we really
dnl need to wrap (IIRC):
diff --git a/libfakeroot.c b/libfakeroot.c
index ddde1cf..e12f740 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -1600,6 +1600,7 @@ getattrlist(const char *path, void *attrList, void *attrBuf,
return 0;
}
+#if HAVE_FGETATTRLIST
#ifdef __LP64__
int
fgetattrlist(int fd, void *attrList, void *attrBuf,
@@ -1630,4 +1631,5 @@ fgetattrlist(int fd, void *attrList, void *attrBuf,
return 0;
}
+#endif /* if HAVE_FGETATTRLIST */
#endif /* ifdef __APPLE__ */
diff --git a/wrapfunc.inp b/wrapfunc.inp
index dd3884e..4c11a5a 100644
--- a/wrapfunc.inp
+++ b/wrapfunc.inp
@@ -35,10 +35,14 @@ WRAP_FSTATAT64;int;FSTATAT64_ARG(int ver, int dir_fd, const char *path, struct s
#ifdef __APPLE__
#ifdef __LP64__
getattrlist;int;(const char *path, void *attrList, void *attrBuf, size_t attrBufSize, unsigned int options);(path, attrList, attrBuf, attrBufSize, options)
+#ifdef HAVE_FGETATTRLIST
fgetattrlist;int;(int fd, void *attrList, void *attrBuf, size_t attrBufSize, unsigned int options);(fd, attrList, attrBuf, attrBufSize, options)
+#endif
#else
getattrlist;int;(const char *path, void *attrList, void *attrBuf, size_t attrBufSize, unsigned long options);(path, attrList, attrBuf, attrBufSize, options)
+#ifdef HAVE_FGETATTRLIST
fgetattrlist;int;(int fd, void *attrList, void *attrBuf, size_t attrBufSize, unsigned long options);(fd, attrList, attrBuf, attrBufSize, options)
+#endif
getattrlist$UNIX2003;int;(const char *path, void *attrList, void *attrBuf, size_t attrBufSize, unsigned long options);(path, attrList, attrBuf, attrBufSize, options)
#endif
lstat$INODE64;int;(const char *file_name, struct stat *buf);(file_name, buf)
--
fakeroot
More information about the Fakeroot-commits
mailing list