From: Felipe Huici Date: Fri, 14 Feb 2020 12:33:11 +0000 (+0100) Subject: Fix double definition warning and add suppress flag for cleaner build. X-Git-Tag: RELEASE-0.4~2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b5c5612ee17acf03053c5d3b1cb3f1b1f272cf39;p=unikraft%2Flibs%2Fruby.git Fix double definition warning and add suppress flag for cleaner build. Signed-off-by: Felipe Huici Reviewed-by: Simon Kuenzer --- diff --git a/Makefile.uk b/Makefile.uk index 8d60bce..6d706b3 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -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 index 0000000..ace691e --- /dev/null +++ b/patches/0002-fix-double-definition-warning-dir-c.patch @@ -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 + #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