From 45765e94d90d407b4190573e47d395e7c2b4a04e Mon Sep 17 00:00:00 2001 From: normal Date: Fri, 22 Jun 2018 08:47:12 +0000 Subject: [PATCH] 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 --- dir.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dir.c b/dir.c index 7bffb0cd27..a7874bc73d 100644 --- a/dir.c +++ b/dir.c @@ -24,6 +24,10 @@ #include #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)