summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-20 04:51:41 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-20 04:51:41 +0000
commitb5d43b1db567fd2ffee4407e31b85cead490e7a4 (patch)
tree0717f6b325c3c58f0a14f9e5217a1a314eda0c9f /dir.c
parent4c426290d65d43e54c69a5ca469ba6a4e8ec1133 (diff)
merge revision(s) 63720: [Backport #14864]
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/branches/ruby_2_5@66878 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 99b9b53bf9..351d36157a 100644
--- a/dir.c
+++ b/dir.c
@@ -22,6 +22,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)