Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id v08Ikkkg026346 for ; Sun, 8 Jan 2017 13:46:47 -0500 Received: from localhost.localdomain (32.206.133.77.rev.sfr.net [77.133.206.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 6BF4256467C for ; Sun, 8 Jan 2017 19:46:39 +0100 (CET) From: Nicolas Iooss To: selinux@tycho.nsa.gov Subject: [PATCH 1/3] libselinux: include errno.h instead of sys/errno.h Date: Sun, 8 Jan 2017 19:45:51 +0100 Message-Id: <20170108184553.31842-1-nicolas.iooss@m4x.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: Building with musl libc leads to some build errors: setrans_client.c: In function ‘receive_response’: setrans_client.c:147:19: error: implicit declaration of function ‘readv’ [-Werror=implicit-function-declaration] while (((count = readv(fd, resp_hdr, 3)) < 0) && (errno == EINTR)) ; ^~~~~ and: In file included from matchpathcon.c:10:0: /usr/include/sys/errno.h:1:2: error: #warning redirecting incorrect #include to [-Werror=cpp] #warning redirecting incorrect #include to ^ Fix the first one by including and the second one by using instead of . Signed-off-by: Nicolas Iooss --- libselinux/src/setrans_client.c | 1 + libselinux/utils/matchpathcon.c | 1 - libselinux/utils/selinux_check_securetty_context.c | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libselinux/src/setrans_client.c b/libselinux/src/setrans_client.c index 8c3a41c8dc52..fa188a824f78 100644 --- a/libselinux/src/setrans_client.c +++ b/libselinux/src/setrans_client.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "dso.h" #include "selinux_internal.h" #include "setrans_internal.h" diff --git a/libselinux/utils/matchpathcon.c b/libselinux/utils/matchpathcon.c index fca8ee29766a..67e4a433da59 100644 --- a/libselinux/utils/matchpathcon.c +++ b/libselinux/utils/matchpathcon.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/libselinux/utils/selinux_check_securetty_context.c b/libselinux/utils/selinux_check_securetty_context.c index 84f59078ba15..5581dde15c83 100644 --- a/libselinux/utils/selinux_check_securetty_context.c +++ b/libselinux/utils/selinux_check_securetty_context.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -6,7 +7,6 @@ #include #include #include -#include #include static __attribute__ ((__noreturn__)) void usage(const char *progname) -- 2.11.0