summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-05-31 19:55:26 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-05-31 19:55:26 (EDT)
commit08ebdeba39eed7fc4c86852667365626edf09c86 (patch)
tree18efa2d1c39a6c9e8aa20105ed5eea105b98fc48 /patches
parent4d00ad8465644e6a46f1d7191eb312ee5eb627b4 (diff)
patches/01_fix-unconditional-use-of-libcap-types.patch: New patch
Diffstat (limited to 'patches')
-rw-r--r--patches/01_fix-unconditional-use-of-libcap-types.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/patches/01_fix-unconditional-use-of-libcap-types.patch b/patches/01_fix-unconditional-use-of-libcap-types.patch
new file mode 100644
index 0000000..423637e
--- /dev/null
+++ b/patches/01_fix-unconditional-use-of-libcap-types.patch
@@ -0,0 +1,37 @@
+Author: Patrick McDermott <patrick.mcdermott@libiquity.com>
+Subject: Fix unconditional use of libcap types
+
+diff -Naurp src.orig/libfakeroot.c src/libfakeroot.c
+--- src.orig/libfakeroot.c 2018-07-01 15:01:34.000000000 -0400
++++ src/libfakeroot.c 2019-05-31 19:49:24.248037242 -0400
+@@ -1561,13 +1561,13 @@ int setgroups(SETGROUPS_SIZE_TYPE size,
+ return 0;
+ }
+
+-#ifdef HAVE_CAPSET
++#if defined(HAVE_CAPSET) && defined(HAVE_SYS_CAPABILITY_H)
+ int capset(cap_user_header_t hdrp, const cap_user_data_t datap)
+ {
+ int rc = next_capset(hdrp, datap);
+ return (fakeroot_disabled) ? (rc) : 0;
+ }
+-#endif /* HAVE_CAPSET */
++#endif /* HAVE_CAPSET && HAVE_SYS_CAPABILITY_H */
+
+ #if defined(HAVE_SETXATTR) || defined(HAVE_LSETXATTR) || defined(HAVE_FSETXATTR)
+ static size_t common_setxattr(INT_STRUCT_STAT *st, const char *name, void * value, size_t size, int flags)
+diff -Naurp src.orig/wrapfunc.inp src/wrapfunc.inp
+--- src.orig/wrapfunc.inp 2018-07-01 15:01:34.000000000 -0400
++++ src/wrapfunc.inp 2019-05-31 19:49:33.312023813 -0400
+@@ -146,9 +146,9 @@ setfsgid;gid_t;(gid_t fsgid);(fsgid)
+ initgroups;int;(const char *user, INITGROUPS_SECOND_ARG group);(user, group)
+ setgroups;int;(SETGROUPS_SIZE_TYPE size, const gid_t *list);(size, list)
+ setpriority;int;(int which, int who, int prio);(which, who, prio)
+-#ifdef HAVE_CAPSET
++#if defined(HAVE_CAPSET) && defined(HAVE_SYS_CAPABILITY_H)
+ capset;int;(cap_user_header_t hdrp, const cap_user_data_t datap);(hdrp, datap)
+-#endif /* HAVE_CAPSET */
++#endif /* HAVE_CAPSET && HAVE_SYS_CAPABILITY_H */
+ #ifdef HAVE_LISTXATTR
+ listxattr; ssize_t;(const char *path, char *list, size_t size);(path, list, size)
+ #endif /* HAVE_LISTXATTR */