summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parse.c1
-rw-r--r--posix1e.h8
-rw-r--r--util.h7
3 files changed, 9 insertions, 7 deletions
diff --git a/parse.c b/parse.c
index 28a9f88..b059fc4 100644
--- a/parse.c
+++ b/parse.c
@@ -22,6 +22,7 @@
#include "exec.h"
#include "expr.h"
#include "mtab.h"
+#include "posix1e.h"
#include "printf.h"
#include "stat.h"
#include "typo.h"
diff --git a/posix1e.h b/posix1e.h
index da7c2b4..ad6a9e9 100644
--- a/posix1e.h
+++ b/posix1e.h
@@ -19,6 +19,14 @@
#include "bftw.h"
#include "util.h"
+#include <stdbool.h>
+
+#if BFS_HAS_SYS_CAPABILITY && !__FreeBSD__
+# include <sys/capability.h>
+# ifdef CAP_CHOWN
+# define BFS_HAS_POSIX1E_CAPABILITIES true
+# endif
+#endif
/**
* Check if a file has a non-trvial Access Control List.
diff --git a/util.h b/util.h
index 2031c02..d96b79d 100644
--- a/util.h
+++ b/util.h
@@ -40,13 +40,6 @@
#define BFS_HAS_SYS_PARAM BFS_HAS_INCLUDE(<sys/param.h>, true)
#define BFS_HAS_SYS_SYSMACROS BFS_HAS_INCLUDE(<sys/sysmacros.h>, __GLIBC__)
-#if BFS_HAS_SYS_CAPABILITY
-# include <sys/capability.h>
-# ifdef CAP_CHOWN
-# define BFS_HAS_POSIX1E_CAPABILITIES true
-# endif
-#endif
-
#if !defined(FNM_CASEFOLD) && defined(FNM_IGNORECASE)
# define FNM_CASEFOLD FNM_IGNORECASE
#endif