Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] include sys/capability.h only if HAVE_CAP_GET_PROC is defined
I'm getting the following warnings on FreeBSD-12.0:
In file included from ./zsh_system.h:526:
/usr/include/sys/capability.h:43:2: warning: this file includes <sys/capability.h> which is deprecated
FreeBSD has sys/capability.h (deprecated and should be replaced by
sys/capsicum.h) but it has nothing to do with libcap.
I believe we need to include sys/capability.h only if
HAVE_CAP_GET_PROC is defined.
diff --git a/Src/zsh_system.h b/Src/zsh_system.h
index e7d529b6e..85e198f2e 100644
--- a/Src/zsh_system.h
+++ b/Src/zsh_system.h
@@ -522,7 +522,7 @@ struct timespec {
# define RLIMIT_VMEM RLIMIT_AS
#endif
-#ifdef HAVE_SYS_CAPABILITY_H
+#if defined(HAVE_SYS_CAPABILITY_H) && defined(HAVE_CAP_GET_PROC)
# include <sys/capability.h>
#endif
Messages sorted by:
Reverse Date,
Date,
Thread,
Author