From 93c7ecc1312157d3487426a8e820b7b574f6a93b Mon Sep 17 00:00:00 2001 From: normal Date: Fri, 22 Jun 2018 08:47:12 +0000 Subject: 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(+) (limited to 'dir.c') 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) -- cgit v1.2.3