]> git.eshelyaron.com Git - emacs.git/commit
Don’t assume openat
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 17 Apr 2022 17:41:17 +0000 (10:41 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 17 Apr 2022 17:43:13 +0000 (10:43 -0700)
commit3cccf0a9107d585173e527550bbc45253624ca2e
tree84f2ace0970fde0dc3c9863755eba8379574ffcf
parent4641bc1c550a81c71798c0176a6bfc34c8947c74
Don’t assume openat

Use openat only on platforms with O_PATH.
This ports to OS X 10.9 and earlier.
Problem reported by Keith David Bershatsky in:
https://lists.gnu.org/r/emacs-devel/2022-04/msg00805.html
* lib-src/emacsclient.c (local_sockname): Use open, not openat.
* src/sysdep.c (sys_openat): New static function,
which uses openat only if O_PATH is defined.
(emacs_openat): Use it instead of openat.
(emacs_openat_noquit): Remove.
(emacs_open_noquit): Reimplement as per the old emacs_openat_noquit,
but use plain 'open'.
lib-src/emacsclient.c
src/sysdep.c