summaryrefslogtreecommitdiffstats
path: root/bftw.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-12-04 11:39:55 -0500
committerTavian Barnes <tavianator@tavianator.com>2016-12-04 11:39:55 -0500
commit49e767ccb9dcfd2161b89f0d7a980eb85f056c5d (patch)
tree3cdb06282e30c02e3b37615d39b5c1c75af53e3d /bftw.c
parent6962fb41b8e57f8bc817b477cf16262a0ce876d5 (diff)
downloadbfs-49e767ccb9dcfd2161b89f0d7a980eb85f056c5d.tar.xz
Move portability code into util.h
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;