From 49e767ccb9dcfd2161b89f0d7a980eb85f056c5d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 4 Dec 2016 11:39:55 -0500 Subject: Move portability code into util.h --- bftw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bftw.c') 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; -- cgit v1.2.3