unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 01699882c4bce132868668f83d0293d9d3d6bcf6 1157 bytes (raw)
name: packages/patches/p11-kit-hurd.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
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;
 

debug log:

solving 01699882c4bce132868668f83d0293d9d3d6bcf6 ...
found 01699882c4bce132868668f83d0293d9d3d6bcf6 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).