* [PATCH] include sys/capability.h only if HAVE_CAP_GET_PROC is defined
@ 2019-08-26 4:29 Jun T
0 siblings, 0 replies; only message in thread
From: Jun T @ 2019-08-26 4:29 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 779 bytes --]
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-26 4:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-26 4:29 [PATCH] include sys/capability.h only if HAVE_CAP_GET_PROC is defined Jun T
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).