Signed-off-by: Felipe Huici <felipe.huici@neclab.eu>
Reviewed-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
-Wno-missing-field-initializers -Wno-overlength-strings \
-Wno-packed-bitfield-compat -Wno-tautological-compare \
-Wno-unused-parameter -Wno-unused-value -Wno-implicit-fallthrough \
- -Wno-unused-but-set-variable
+ -Wno-unused-but-set-variable -Wno-type-limits
LIBRUBY_SUPPRESS_FLAGS-$(call gcc_version_ge,9,0) += -Wno-address-of-packed-member
LIBRUBY_SUPRESS_CFLAGS-y += $(LIBRUBY_SUPPRESS_FLAGS-y) \
-Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
--- /dev/null
+--- a/dir.c.orig 2020-02-14 13:17:05.146913259 +0100
++++ b/dir.c 2020-02-14 13:17:17.010776446 +0100
+@@ -24,10 +24,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)
+@@ -43,6 +39,10 @@
+ # define AT_FDCWD -1
+ #endif
+
++#ifndef O_CLOEXEC
++# define O_CLOEXEC 0
++#endif
++
+ #undef HAVE_DIRENT_NAMLEN
+ #if defined HAVE_DIRENT_H && !defined _WIN32
+ # include <dirent.h>