From 46387a7dcda93e7df9f5baa3ead753c0feeff122 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 6 Nov 2022 11:52:49 -0500 Subject: util: Get rid of BFS_HAS_INCLUDE() wrapper for __has_include() Since __has_include() needs special preprocessing rules (e.g. not expanding `linux` in `__has_include()`, macros that expand to __has_include() do not necessarily behave correctly. Instead, we have to directly test `#if __has_include(...)`. See https://bugs.llvm.org/show_bug.cgi?id=37990 for more details. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bf99a8e..a251234 100644 --- a/Makefile +++ b/Makefile @@ -106,19 +106,19 @@ endif ifdef WITH_ACL LOCAL_LDLIBS += -lacl else -LOCAL_CPPFLAGS += -DBFS_HAS_SYS_ACL=0 +LOCAL_CPPFLAGS += -DBFS_USE_SYS_ACL_H=0 endif ifdef WITH_ATTR LOCAL_LDLIBS += -lattr else -LOCAL_CPPFLAGS += -DBFS_HAS_SYS_XATTR=0 +LOCAL_CPPFLAGS += -DBFS_USE_SYS_XATTR_H=0 endif ifdef WITH_LIBCAP LOCAL_LDLIBS += -lcap else -LOCAL_CPPFLAGS += -DBFS_HAS_SYS_CAPABILITY=0 +LOCAL_CPPFLAGS += -DBFS_USE_SYS_CAPABILITY_H=0 endif LOCAL_LDFLAGS += -Wl,--as-needed -- cgit v1.2.3