cap_init() and friends are Linux-specific, so only use them if we're on Linux.
Add support for FreeBSD capabilities if we find
Add an #else (not Linux or FreeBSD) case with an #error requesting contributions for other platforms.
This patch keeps the cap_init check in configure.ac but removes the error if it fails. This will ensure we link to -lcap if needed, but won't fail for the case that capabilities are part of the core system (as on FreeBSD).
We do however, modify the header check to ensure we fail if there is no
--without-caps remains an option if the user wants to force it.
1da34e9 Add support for FreeBSD
configure.ac | 24 ++++++++++++++++--------
src/daemon/caps.c | 6 ++++++
2 files changed, 22 insertions(+), 8 deletions(-)