diff options
author | Eli Zaretskii <eliz@gnu.org> | 2022-04-17 22:03:52 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-04-17 22:03:52 +0300 |
commit | c2f94f32b5e8f57e2b4e723c9799cf0e5f5e5bcc (patch) | |
tree | 656aa67a529748a6ad1b5282c5c7794adfda98c7 /lib-src | |
parent | 3cccf0a9107d585173e527550bbc45253624ca2e (diff) | |
download | emacs-c2f94f32b5e8f57e2b4e723c9799cf0e5f5e5bcc.tar.gz |
Revert "Don’t assume openat"
This reverts commit 3cccf0a9107d585173e527550bbc45253624ca2e.
This is a change with far-reaching effects on MS-Windows at the least,
where file-related APIs are shadowed to support transparent support
for UTF-8 encoded file names. Making such changes on a stable branch
for the benefit of a proprietary platform with a 13-year old OS is a
tail wagging the dog. Please don't do that without discussing first.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/emacsclient.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 217a38bc07f..57a5eff3bf6 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1412,7 +1412,8 @@ local_sockname (int s, char sockname[socknamesize], int tmpdirlen, char *emacsdirend = sockname + tmpdirlen + suffixlen - strlen(server_name) - 1; *emacsdirend = '\0'; - int dir = open (sockname, O_PATH | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); + int dir = openat (AT_FDCWD, sockname, + O_PATH | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); *emacsdirend = '/'; if (dir < 0) return errno; |