all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Glenn Morris <rgm@gnu.org>, 35406@debbugs.gnu.org
Cc: Josh Howard <jraitch@outlook.com>
Subject: bug#35406: Build error for emacsclient on FreeBSD
Date: Wed, 24 Apr 2019 17:45:00 -0700	[thread overview]
Message-ID: <cb32740f-1b33-de4d-5abb-09b595d2b4d1@cs.ucla.edu> (raw)
In-Reply-To: <2wa7gfwfj3.fsf@fencepost.gnu.org>

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

Josh Howard wrote:
> I'd propose it be switched to eaccess() which should be a synonym on Linux and makes it a bit more portable.
Sorry, I messed up. I should have used the POSIX-specified faccessat,
which has a Gnulib portability emulation for platforms lacking
faccessat. I installed the attached into master; please give it a try.

[-- Attachment #2: euidaccess.patch --]
[-- Type: text/x-patch, Size: 600 bytes --]

diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 5871a18ce6..fd56007b15 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)
+	      && faccessat (AT_FDCWD, sockdirname, X_OK, AT_EACCESS) == 0)
 	    message
 	      (true,
 	       ("%s: Should XDG_RUNTIME_DIR='%s' be in the environment?\n"

  reply	other threads:[~2019-04-25  0:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23 23:26 bug#35406: Build error for emacsclient on FreeBSD Josh Howard
2019-04-24 16:10 ` Glenn Morris
2019-04-25  0:45   ` Paul Eggert [this message]
2019-04-25  3:21     ` Josh Howard
2019-04-25 22:15       ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb32740f-1b33-de4d-5abb-09b595d2b4d1@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=35406@debbugs.gnu.org \
    --cc=jraitch@outlook.com \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.