From: Jun T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: [PATCH] include sys/capability.h only if HAVE_CAP_GET_PROC is defined
Date: Mon, 26 Aug 2019 13:29:55 +0900 [thread overview]
Message-ID: <E0F8408F-54B5-4196-A741-50C00046320E@kba.biglobe.ne.jp> (raw)
[-- 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
reply other threads:[~2019-08-26 4:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E0F8408F-54B5-4196-A741-50C00046320E@kba.biglobe.ne.jp \
--to=takimoto-j@kba.biglobe.ne.jp \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).