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; fslogtreecommitdiff
path: root/etc/completion
AgeCommit message (Expand)Author
2020-12-04bash completion: Complete file names after '-f' and '-l'....* etc/completion/bash/guix (_guix_is_dash_f, _guix_is_dash_l): New functions. (_guix_complete): Complete file names after 'guix package -f', 'guix build -f', and 'guix environment -l'. Ludovic Courtès
2020-09-24bash completion: Adjust to new 'guix help' output....This is a followup to 3794ce93be8216d8378df7b808ce7f53b1e05a53, which broke command completion. Reported by Oleg Pykhalov <go.wigust@gmail.com>. * etc/completion/bash/guix (_guix_complete_command): Update to match output of 'guix help' as introduced in 3794ce93be8216d8378df7b808ce7f53b1e05a53. Ludovic Courtès
2020-09-21bash completion: Complete file names after 'guix package -p'....* etc/completion/bash/guix (_guix_complete): Add _guix_is_dash_p. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Fulbert
2020-09-10bash completion: Restore completion for 'guix system', etc....Commit 538ca8dd65f0075cc65bcca18ed87f66a789290a introduced a second '_guix_complete_subcommand' function, shadowing the existing one, which broke sub-command completion for 'guix system', 'guix import', etc. * etc/completion/bash/guix: Distinguish between '_guix_complete_command' and '_guix_complete_subcommand'. Adjust users to call the right one. Ludovic Courtès