[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. debian/1.14.3-200-gb232f8a

Clint Adams schizo at debian.org
Tue Aug 23 13:06:06 UTC 2011


The following commit has been merged in the upstream branch:
commit 5df61d3cd710dcad5337ad185c4cf05cf05f3e4d
Author: Clint Adams <schizo at debian.org>
Date:   Sat Jan 5 19:07:32 2008 +0000

    make acls conditional
    
    git-archimport-id: fakeroot at packages.debian.org--fakeroot/fakeroot--main--0.0--patch-153

diff --git a/configure.ac b/configure.ac
index f6ac2c1..0b091b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,7 +59,9 @@ AC_SUBST(signal)
 dnl Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h unistd.h features.h sys/feature_tests.h pthread.h stdint.h inttypes.h grp.h endian.h sys/sysmacros.h sys/socket.h)
+AC_CHECK_HEADERS(fcntl.h unistd.h features.h sys/feature_tests.h pthread.h
+		 stdint.h inttypes.h grp.h endian.h sys/sysmacros.h
+		 sys/socket.h sys/acl.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -273,7 +275,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
   ])
 done
 
-AC_CHECK_FUNCS(fchmodat fchownat fstatat mkdirat mknodat openat renameat unlinkat)
+AC_CHECK_FUNCS(fchmodat fchownat fstatat mkdirat mknodat openat renameat
+	       unlinkat acl_set_fd acl_set_file)
 
 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 8414c85..728fd4c 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -58,7 +58,9 @@
 #include <dirent.h>
 #include <errno.h>
 #include <sys/types.h>
+#ifdef HAVE_SYS_ACL_H
 #include <sys/acl.h>
+#endif /* HAVE_SYS_ACL_H */
 
 #if !HAVE_DECL_SETENV
 extern int setenv (const char *name, const char *value, int replace);
@@ -1464,12 +1466,16 @@ int fakeroot_isdisabled(void)
   return fakeroot_disabled;
 }
 
+#ifdef HAVE_ACL_SET_FD
 int acl_set_fd(int fd, acl_t acl) {
   errno = ENOTSUP;
   return -1;
 }
+#endif /* HAVE_ACL_SET_FD */
 
+#ifdef HAVE_ACL_SET_FILE
 int acl_set_file(const char *path_p, acl_type_t type, acl_t acl) {
   errno = ENOTSUP;
   return -1;
 }
+#endif /* HAVE_ACL_SET_FILE */
diff --git a/wrapfunc.inp b/wrapfunc.inp
index fd14c0d..d0d505f 100644
--- a/wrapfunc.inp
+++ b/wrapfunc.inp
@@ -123,5 +123,9 @@ unlinkat;int;(int dir_fd, const char *pathname, int flags);(dir_fd, pathname, fl
 #endif /* HAVE_UNLINKAT */
 #endif /* HAVE_FSTATAT */
 
+#ifdef HAVE_ACL_SET_FD
 acl_set_fd;int;(int fd, acl_t acl);(fd, acl)
+#endif /* HAVE_ACL_SET_FD */
+#ifdef HAVE_ACL_SET_FILE
 acl_set_file;int;(const char *path_p, acl_type_t type, acl_t acl);(path_p, type, acl)
+#endif /* HAVE_ACL_SET_FILE */

-- 
fakeroot



More information about the Fakeroot-commits mailing list