summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-22 08:47:12 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-22 08:47:12 (GMT)
commit45765e94d90d407b4190573e47d395e7c2b4a04e (patch)
tree32c9f9c390a959b3d9a6db954aa1b4b8276ea4e0 /dir.c
parent3839734b945e464b678a9718fdce3c05e9e7f613 (diff)
dir.c: define O_CLOEXEC for older systems
SuSE 10 has openat(), but not O_CLOEXEC Reported-by: wangpeiwen [ruby-core:87591] [Bug #14864] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index 7bffb0c..a7874bc 100644
--- a/dir.c
+++ b/dir.c
@@ -24,6 +24,10 @@
#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)