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 #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; 94'>refslogtreecommitdiff
path: root/tests/offload.scm
AgeCommit message (Expand)Author
2020-08-25offload: Modify the build-machine record to accept multiple systems....* guix/scripts/offload.scm (<build-machine>)[systems]: New field. [system]: Accessor changed to %build-machine-system. Default to #f. * guix/scripts/offload.scm (build-machine-system): Wrap %build-machine-system with a deprecation warning. (build-machine-systems): Access the new systems field or fallback to use build-machine-system, for backward compatibility. (machine-matches?): Adjust. * tests/offload.scm: Add tests... * Makefile.am (SCM_TESTS): ...and register them. * doc/guix.texi (Daemon Offload Setup): Update doc. Maxim Cournoyer