GNU bug report logs -
#35406
Build error for emacsclient on FreeBSD
Previous Next
Reported by: Josh Howard <jraitch <at> outlook.com>
Date: Tue, 23 Apr 2019 23:27:02 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 35406 <at> debbugs.gnu.org (full text, mbox):
cc'ing the author of
http://lists.gnu.org/r/emacs-diffs/2019-04/msg00463.html
Josh Howard wrote:
> It appears in a recent commit there was a change to emacsclient.c that breaks its ability to build on FreeBSD by using the euidaccess() function which doesn't exist on the platform.
>
> CCLD emacsclient
> emacsclient.c:1475:11: warning: implicit declaration of function 'euidaccess' is
> invalid in C99 [-Wimplicit-function-declaration]
> && euidaccess (sockdirname, X_OK) == 0)
> ^
> 1 warning generated.
> /usr/bin/ld: error: undefined symbol: euidaccess
>>>> referenced by emacsclient.c:1475
>>>> /tmp/emacsclient-a0b189.o:(set_local_socket)
> cc: error: linker command failed with exit code 1 (use -v to see invocation)
> gmake: *** [Makefile:399: emacsclient] Error 1
>
> I'd propose it be switched to eaccess() which should be a synonym on Linux and makes it a bit more portable.
>
> diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
> index 5871a18ce6..aac1b3c2b4 100644
> --- a/lib-src/emacsclient.c
> +++ b/lib-src/emacsclient.c
> @@ -1472,7 +1472,7 @@ set_local_socket (char const *server_name)
> int sockdirnamelen = snprintf (sockdirname, sizeof sockdirname,
> "/run/user/%"PRIuMAX, id);
> if (0 <= sockdirnamelen && sockdirnamelen < sizeof sockdirname
> - && euidaccess (sockdirname, X_OK) == 0)
> + && eaccess (sockdirname, X_OK) == 0)
> message
> (true,
> ("%s: Should XDG_RUNTIME_DIR='%s' be in the environment?\n"
This bug report was last modified 6 years and 23 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.