cbfstool: Avoid defining _XOPEN_SOURCE

This restricts availability of non-standard functions (such as memmem)
on FreeBSD and macOS. It also isn't necessary on glibc.

Change-Id: Iaee1ce7304c89f128a35a385032fce16a2772b13
Signed-off-by: Alex James <theracermaster@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60232
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Alex James 2021-12-19 15:52:49 -06:00 committed by Felix Held
parent 8a44eb9a5b
commit 2219d89d9d
1 changed files with 0 additions and 4 deletions

View File

@ -134,10 +134,6 @@ TOOLCPPFLAGS += -I$(top)/src/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include
TOOLLDFLAGS ?= TOOLLDFLAGS ?=
HOSTCFLAGS += -fms-extensions HOSTCFLAGS += -fms-extensions
ifneq ($(shell uname -o 2>/dev/null), FreeBSD)
TOOLCPPFLAGS += -D_XOPEN_SOURCE=700 # strdup() from string.h
endif
ifeq ($(shell uname -s | cut -c-7 2>/dev/null), MINGW32) ifeq ($(shell uname -s | cut -c-7 2>/dev/null), MINGW32)
TOOLCFLAGS += -mno-ms-bitfields TOOLCFLAGS += -mno-ms-bitfields
endif endif