summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bfs.h2
-rw-r--r--src/dir.h2
-rw-r--r--src/fsade.h2
-rw-r--r--src/mtab.c14
4 files changed, 14 insertions, 6 deletions
diff --git a/src/bfs.h b/src/bfs.h
index ad6a628..af4cf9f 100644
--- a/src/bfs.h
+++ b/src/bfs.h
@@ -204,6 +204,8 @@ extern const char bfs_ldlibs[];
#ifndef BFS_USE_TARGET_CLONES
# if __has_attribute(target_clones) && (__GLIBC__ || __FreeBSD__) && !__SANITIZE_THREAD__
# define BFS_USE_TARGET_CLONES true
+# else
+# define BFS_USE_TARGET_CLONES false
# endif
#endif
diff --git a/src/dir.h b/src/dir.h
index 0040b95..35a459d 100644
--- a/src/dir.h
+++ b/src/dir.h
@@ -21,6 +21,8 @@
# define BFS_USE_GETDENTS true
# elif __linux__ || __FreeBSD__
# define BFS_USE_GETDENTS (BFS_HAS_GETDENTS || BFS_HAS_GETDENTS64 | BFS_HAS_GETDENTS64_SYSCALL)
+# else
+# define BFS_USE_GETDENTS false
# endif
#endif
diff --git a/src/fsade.h b/src/fsade.h
index edac68b..fbe02d8 100644
--- a/src/fsade.h
+++ b/src/fsade.h
@@ -19,6 +19,8 @@
#if __has_include(<sys/extattr.h>) || __has_include(<sys/xattr.h>)
# define BFS_CAN_CHECK_XATTRS true
+#else
+# define BFS_CAN_CHECK_XATTRS false
#endif
struct BFTW;
diff --git a/src/mtab.c b/src/mtab.c
index 79f3100..bf9fc53 100644
--- a/src/mtab.c
+++ b/src/mtab.c
@@ -15,12 +15,14 @@
#include <string.h>
#include <sys/types.h>
-#if !defined(BFS_USE_MNTENT) && BFS_HAS_GETMNTENT_1
-# define BFS_USE_MNTENT true
-#elif !defined(BFS_USE_MNTINFO) && BFS_HAS_GETMNTINFO
-# define BFS_USE_MNTINFO true
-#elif !defined(BFS_USE_MNTTAB) && BFS_HAS_GETMNTENT_2
-# define BFS_USE_MNTTAB true
+#ifndef BFS_USE_MNTENT
+# define BFS_USE_MNTENT BFS_HAS_GETMNTENT_1
+#endif
+#ifndef BFS_USE_MNTINFO
+# define BFS_USE_MNTINFO (!BFS_USE_MNTENT && BFS_HAS_GETMNTINFO)
+#endif
+#ifndef BFS_USE_MNTTAB
+# define BFS_USE_MNTTAB (!BFS_USE_MNTINFO && BFS_HAS_GETMNTENT_2)
#endif
#if BFS_USE_MNTENT