]> xenbits.xensource.com Git - unikraft/libs/ruby.git/commitdiff
Fix double definition warning and add suppress flag for cleaner build.
authorFelipe Huici <felipe.huici@neclab.eu>
Fri, 14 Feb 2020 12:33:11 +0000 (13:33 +0100)
committerSimon Kuenzer <simon.kuenzer@neclab.eu>
Fri, 14 Feb 2020 13:33:11 +0000 (14:33 +0100)
Signed-off-by: Felipe Huici <felipe.huici@neclab.eu>
Reviewed-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Makefile.uk
patches/0002-fix-double-definition-warning-dir-c.patch [new file with mode: 0644]

index 8d60bce13d781e6791ff628403278862f3fcc5f1..6d706b3d573dec24909478d02fae636f97d4aea7 100644 (file)
@@ -66,7 +66,7 @@ LIBRUBY_SUPPRESS_FLAGS-y = -Wno-cast-function-type -Wno-long-long \
        -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
diff --git a/patches/0002-fix-double-definition-warning-dir-c.patch b/patches/0002-fix-double-definition-warning-dir-c.patch
new file mode 100644 (file)
index 0000000..ace691e
--- /dev/null
@@ -0,0 +1,24 @@
+--- 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>