]> xenbits.xensource.com Git - unikraft/libs/musl.git/commitdiff
Move _XOPEN_SOURCE define to library CFLAGS
authorMarco Schlumpp <marco@unikraft.io>
Fri, 9 Dec 2022 12:36:22 +0000 (13:36 +0100)
committerUnikraft <monkey@unikraft.io>
Wed, 1 Feb 2023 08:27:32 +0000 (08:27 +0000)
Putting it into CFLAGS changes the behavior for all sources files in a
Unikraft build and changes them from the implicit _DEFAULT_SOURCE to
_XOPEN_SOURCE, which can break applications/libraries.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #33

Makefile.uk

index 866046b749bf99e84b6cb21b4bdbc5356ca312b9..1bd62cb9366bbdc556daf4ac6060716ed41192c1 100644 (file)
@@ -112,7 +112,6 @@ LIBMUSL_HDRS_FLAGS-y += -Wno-unused-value
 LIBMUSL_HDRS_FLAGS-y += -Wno-parentheses
 LIBMUSL_HDRS_FLAGS-y += -Wno-error=sign-compare
 LIBMUSL_HDRS_FLAGS-y += -Wno-builtin-macro-redefined
-LIBMUSL_HDRS_FLAGS-y += -D_XOPEN_SOURCE=700
 
 LIBMUSL_CFLAGS-y += -Wno-implicit-fallthrough
 LIBMUSL_CFLAGS-y += -Wno-restrict
@@ -126,6 +125,7 @@ LIBMUSL_CFLAGS-$(call gcc_version_ge,8,0) += -Wno-cast-function-type
 LIBMUSL_CFLAGS-y += -Wno-format-contains-nul
 LIBMUSL_CFLAGS-y += -Wno-type-limits
 LIBMUSL_CFLAGS-y += -DUK_LIBC_SYSCALL=0
+LIBMUSL_CFLAGS-y += -D_XOPEN_SOURCE=700
 LIBMUSL_CFLAGS-y += $(LIBMUSL_HDRS_FLAGS-y)
 
 # We globally switch off warnings that are caused by musl's public headers