summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/p11-kit-hurd.patch
diff options
context:
space:
mode:
authorMaxim Cournoyer <[email protected]>2022-01-25 22:07:13 -0500
committerMaxim Cournoyer <[email protected]>2022-01-25 22:07:13 -0500
commit1a5302435ff0d2822b823f5a6fe01faa7a85c629 (patch)
treeac7810c88b560532f22d2bab2e59609cd7305c21 /gnu/packages/patches/p11-kit-hurd.patch
parent3ff2ac4980dacf10087e4b42bd9fbc490591900c (diff)
parent070b8a893febd6e7d8b2b7c8c4dcebacf7845aa9 (diff)
Merge branch 'master' into staging.
With "conflicts" solved (all in favor of master except git) in: gnu/local.mk gnu/packages/databases.scm gnu/packages/glib.scm gnu/packages/gnome.scm gnu/packages/gnupg.scm gnu/packages/gnuzilla.scm gnu/packages/graphics.scm gnu/packages/gstreamer.scm gnu/packages/gtk.scm gnu/packages/linux.scm gnu/packages/machine-learning.scm gnu/packages/networking.scm gnu/packages/polkit.scm gnu/packages/pulseaudio.scm gnu/packages/rpc.scm gnu/packages/rust.scm gnu/packages/version-control.scm gnu/packages/w3m.scm
Diffstat (limited to 'gnu/packages/patches/p11-kit-hurd.patch')
-rw-r--r--gnu/packages/patches/p11-kit-hurd.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/patches/p11-kit-hurd.patch b/gnu/packages/patches/p11-kit-hurd.patch
new file mode 100644
index 0000000000..01699882c4
--- /dev/null
+++ b/gnu/packages/patches/p11-kit-hurd.patch
@@ -0,0 +1,46 @@
+Taken from: https://groups.google.com/g/linux.debian.bugs.dist/c/mX4GpUJih4k.
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -132,6 +132,16 @@ if test "$os_unix" = "yes"; then
+ AC_CHECK_FUNCS([getpeereid])
+ AC_CHECK_FUNCS([getpeerucred])
+ AC_CHECK_FUNCS([issetugid])
++ case "$host_os" in
++ kfreebsd*-gnu | gnu*)
++ have_getpeereid=no
++ AC_CHECK_LIB(bsd, getpeereid, have_getpeereid=yes)
++ if test "x$have_getpeereid" = "xyes"; then
++ AC_DEFINE([HAVE_GETPEEREID], [1], [have getpeereid])
++ AC_SEARCH_LIBS([getpeereid], [bsd])
++ fi
++ ;;
++ esac
+
+ AC_CACHE_CHECK([for thread-local storage class],
+ [ac_cv_tls_keyword],
+
+--- a/common/unix-peer.c
++++ b/common/unix-peer.c
+@@ -47,6 +47,11 @@
+ # include <ucred.h>
+ #endif
+
++#ifdef HAVE_GETPEEREID
++/* Declare getpeereid from /usr/include/bsd/unistd.h */
++extern int getpeereid(int s, uid_t *euid, gid_t *egid);
++#endif
++
+ /* Returns the unix domain socket peer information.
+ * Returns zero on success.
+ */
+@@ -73,7 +78,8 @@ p11_get_upeer_id (int cfd, uid_t *uid, u
+ *pid = cr.pid;
+
+ #elif defined(HAVE_GETPEEREID)
+- /* *BSD/MacOSX */
++ /* *BSD/MacOSX/kFreeBSD/Hurd */
++
+ uid_t euid;
+ gid_t egid;
+ \ No newline at end of file