diff options
author | Collin Funk <[email protected]> | 2025-02-11 21:07:40 -0800 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2025-02-17 13:05:18 +0900 |
commit | c1c7934b63d7682216fed9dd7c9ddff5b72fea89 () | |
tree | f8e61383551e969d00b2ceb1bb8911ff96a166b5 | |
parent | c8f4df4ae93cec8825c919bfebaa5f1f744ba09c (diff) |
[Bug #21128] Include fcntl.h before checking for O_CLOEXEC
On glibc O_CLOEXEC is defined in fcntl.h and not unistd.h so this change prevents the macro from being redefined.
Notes: Merged: https://.com/ruby/ruby/pull/12735
-rw-r--r-- | dir.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -22,10 +22,6 @@ #include <unistd.h> #endif -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - #ifndef USE_OPENDIR_AT # if defined(HAVE_FDOPENDIR) && defined(HAVE_DIRFD) && \ defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) @@ -35,8 +31,12 @@ # endif #endif -#if USE_OPENDIR_AT -# include <fcntl.h> #endif #undef HAVE_DIRENT_NAMLEN |