[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. 04dab641455927d5062151311f4cb4c128aa6392

Clint Adams clint at debian.org
Sun Apr 22 02:15:21 UTC 2012


The following commit has been merged in the upstream branch:
commit d6f29a80945ea9c299aa0e74a9faed841132bea2
Author: Mikhail Gusarov <mikhail.gusarov at cfengine.com>
Date:   Tue Apr 10 15:39:02 2012 +0200

    Only wrap ACL-related functions if those are provided by operating system

diff --git a/configure.ac b/configure.ac
index 70eb341..4fdabf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -274,6 +274,17 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
   ])
 done
 
+AH_TEMPLATE([HAVE_ACL_T], [acl_t data type and associated functions are provided by OS])
+AC_MSG_CHECKING([for acl_t struct])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+       #include <sys/acl.h>
+  ]], [[
+       acl_t t;
+  ]])],[AC_DEFINE_UNQUOTED(HAVE_ACL_T,1)
+   AC_MSG_RESULT([yes])
+  ],[ AC_MSG_RESULT([no])
+  ])
+
 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
diff --git a/libfakeroot.c b/libfakeroot.c
index 0675efc..e69240f 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -1536,7 +1536,7 @@ int fakeroot_isdisabled(void)
   return fakeroot_disabled;
 }
 
-#ifdef HAVE_SYS_ACL_H
+#ifdef HAVE_ACL_T
 int acl_set_fd(int fd, acl_t acl) {
   errno = ENOTSUP;
   return -1;
diff --git a/wrapfunc.inp b/wrapfunc.inp
index a9c1b67..40f78eb 100644
--- a/wrapfunc.inp
+++ b/wrapfunc.inp
@@ -158,10 +158,10 @@ unlinkat;int;(int dir_fd, const char *pathname, int flags);(dir_fd, pathname, fl
 #endif /* HAVE_UNLINKAT */
 #endif /* HAVE_FSTATAT */
 
-#ifdef HAVE_SYS_ACL_H
+#ifdef HAVE_ACL_T
 acl_set_fd;int;(int fd, acl_t acl);(fd, acl)
 acl_set_file;int;(const char *path_p, acl_type_t type, acl_t acl);(path_p, type, acl)
-#endif /* HAVE_SYS_ACL_H */
+#endif /* HAVE_ACL_T */
 
 #ifdef HAVE_FTS_READ
 fts_read;FTSENT *;(FTS *ftsp);(ftsp)

-- 
fakeroot



More information about the Fakeroot-commits mailing list