diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-11-06 11:52:49 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-11-06 16:37:14 -0500 |
commit | 46387a7dcda93e7df9f5baa3ead753c0feeff122 (patch) | |
tree | 73223994a7fb667d88df4849a5056696e203bb63 /src/fsade.h | |
parent | 0a5a80c98cc7e5d8735b615fa197a6cff2bb08cc (diff) | |
download | bfs-46387a7dcda93e7df9f5baa3ead753c0feeff122.tar.xz |
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(<linux/stat.h>)`, 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.
Diffstat (limited to 'src/fsade.h')
-rw-r--r-- | src/fsade.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fsade.h b/src/fsade.h index e964112..bd7fc5b 100644 --- a/src/fsade.h +++ b/src/fsade.h @@ -25,16 +25,16 @@ #include "util.h" #include <stdbool.h> -#define BFS_CAN_CHECK_ACL BFS_HAS_SYS_ACL +#define BFS_CAN_CHECK_ACL BFS_USE_SYS_ACL_H -#if !defined(BFS_CAN_CHECK_CAPABILITIES) && BFS_HAS_SYS_CAPABILITY && !__FreeBSD__ +#if !defined(BFS_CAN_CHECK_CAPABILITIES) && BFS_USE_SYS_CAPABILITY_H && !__FreeBSD__ # include <sys/capability.h> # ifdef CAP_CHOWN # define BFS_CAN_CHECK_CAPABILITIES true # endif #endif -#define BFS_CAN_CHECK_XATTRS (BFS_HAS_SYS_EXTATTR || BFS_HAS_SYS_XATTR) +#define BFS_CAN_CHECK_XATTRS (BFS_USE_SYS_EXTATTR_H || BFS_USE_SYS_XATTR_H) struct BFTW; |