summaryrefslogtreecommitdiffstats
path: root/bftw.c
diff options
context:
space:
mode:
Diffstat (limited to 'bftw.c')
-rw-r--r--bftw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bftw.c b/bftw.c
index 6205d79..614b418 100644
--- a/bftw.c
+++ b/bftw.c
@@ -359,10 +359,10 @@ static DIR *dircache_entry_open(struct dircache *cache, struct dircache_entry *e
// footprint significantly, while keeping the fd around for future
// openat() calls.
- fd = fcntl(entry->fd, F_DUPFD_CLOEXEC, 0);
+ fd = dup_cloexec(entry->fd);
if (fd < 0 && dircache_should_retry(cache, entry)) {
- fd = fcntl(entry->fd, F_DUPFD_CLOEXEC, 0);
+ fd = dup_cloexec(entry->fd);
}
if (fd < 0) {
return NULL;