diff options
Diffstat (limited to 'sysdeps/posix')
-rw-r--r-- | sysdeps/posix/fdopendir.c | 2 | ||||
-rw-r--r-- | sysdeps/posix/opendir.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/posix/fdopendir.c b/sysdeps/posix/fdopendir.c index ab4541f..dafb5d2 100644 --- a/sysdeps/posix/fdopendir.c +++ b/sysdeps/posix/fdopendir.c @@ -38,7 +38,7 @@ __fdopendir (int fd) } /* Make sure the descriptor allows for reading. */ - int flags = __fcntl (fd, F_GETFL); + int flags = __fcntl_nocancel (fd, F_GETFL); if (__glibc_unlikely (flags == -1)) return NULL; if (__glibc_unlikely ((flags & O_ACCMODE) == O_WRONLY)) diff --git a/sysdeps/posix/opendir.c b/sysdeps/posix/opendir.c index d925804..e65a09c 100644 --- a/sysdeps/posix/opendir.c +++ b/sysdeps/posix/opendir.c @@ -197,7 +197,7 @@ __alloc_dir (int fd, bool close_fd, int flags, const struct stat64 *statp) /* We have to set the close-on-exit flag if the user provided the file descriptor. */ if (!close_fd - && __builtin_expect (__fcntl (fd, F_SETFD, FD_CLOEXEC), 0) < 0) + && __glibc_unlikely (__fcntl_nocancel (fd, F_SETFD, FD_CLOEXEC) < 0)) goto lose; const size_t default_allocation = (4 * BUFSIZ < sizeof (struct dirent64) |