diff options
| author | Eli Zaretskii | 2022-04-17 22:03:52 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2022-04-17 22:03:52 +0300 |
| commit | c2f94f32b5e8f57e2b4e723c9799cf0e5f5e5bcc (patch) | |
| tree | 656aa67a529748a6ad1b5282c5c7794adfda98c7 /lib-src | |
| parent | 3cccf0a9107d585173e527550bbc45253624ca2e (diff) | |
| download | emacs-c2f94f32b5e8f57e2b4e723c9799cf0e5f5e5bcc.tar.gz emacs-c2f94f32b5e8f57e2b4e723c9799cf0e5f5e5bcc.zip | |
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, | |||
| 1412 | char *emacsdirend = sockname + tmpdirlen + suffixlen - | 1412 | char *emacsdirend = sockname + tmpdirlen + suffixlen - |
| 1413 | strlen(server_name) - 1; | 1413 | strlen(server_name) - 1; |
| 1414 | *emacsdirend = '\0'; | 1414 | *emacsdirend = '\0'; |
| 1415 | int dir = open (sockname, O_PATH | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); | 1415 | int dir = openat (AT_FDCWD, sockname, |
| 1416 | O_PATH | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); | ||
| 1416 | *emacsdirend = '/'; | 1417 | *emacsdirend = '/'; |
| 1417 | if (dir < 0) | 1418 | if (dir < 0) |
| 1418 | return errno; | 1419 | return errno; |