handle CONFIG_SEAL_METADATA option like the others

This commit is contained in:
Daniel Micay 2019-08-18 01:56:20 -04:00
parent defd55f302
commit d8ebdea05f
2 changed files with 4 additions and 3 deletions

View File

@ -53,8 +53,8 @@ ifeq ($(CONFIG_UBSAN),true)
CXXFLAGS += -fsanitize=undefined
endif
ifeq ($(CONFIG_SEAL_METADATA),true)
CPPFLAGS += -DCONFIG_SEAL_METADATA
ifeq (,$(filter $(CONFIG_SEAL_METADATA),true false))
$(error CONFIG_SEAL_METADATA must be true or false)
endif
ifeq (,$(filter $(CONFIG_ZERO_ON_FREE),true false))
@ -86,6 +86,7 @@ ifeq (,$(filter $(CONFIG_STATS),true false))
endif
CPPFLAGS += \
-DCONFIG_SEAL_METADATA=$(CONFIG_SEAL_METADATA) \
-DZERO_ON_FREE=$(CONFIG_ZERO_ON_FREE) \
-DWRITE_AFTER_FREE_CHECK=$(CONFIG_WRITE_AFTER_FREE_CHECK) \
-DSLOT_RANDOMIZE=$(CONFIG_SLOT_RANDOMIZE) \

2
util.h
View File

@ -51,7 +51,7 @@ extern int __register_atfork(void (*)(void), void (*)(void), void (*)(void), voi
#define atfork pthread_atfork
#endif
#ifdef CONFIG_SEAL_METADATA
#if CONFIG_SEAL_METADATA
#ifdef __GLIBC__
#if __GLIBC_PREREQ(2, 27)