diff options
author | Daniel Mack <zonque@gmail.com> | 2013-11-21 20:26:10 +0100 |
---|---|---|
committer | Daniel Mack <zonque@gmail.com> | 2013-11-21 20:33:23 +0100 |
commit | 94d56326a1cb337151ea0984d5b86f6edc005bce (patch) | |
tree | 77223bf7f55d73b250d60a450efae2602a251f28 /src/core/selinux-access.c | |
parent | 29db78811db523caf53e873db539a48a1337d652 (diff) |
src/core/selinux-access: #include <sys/socket.h>
Fixes the following build errors on Fedora 20:
CC src/core/libsystemd_core_la-selinux-access.lo
src/core/selinux-access.c: In function 'get_audit_data':
src/core/selinux-access.c:245:22: error: storage size of 'ucred' isn't known
struct ucred ucred;
^
src/core/selinux-access.c:259:9: warning: implicit declaration of function 'getsockopt' [-Wimplicit-function-declaration]
r = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len);
^
src/core/selinux-access.c:259:28: error: 'SOL_SOCKET' undeclared (first use in this function)
r = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len);
^
src/core/selinux-access.c:259:28: note: each undeclared identifier is reported only once for each function it appears in
src/core/selinux-access.c:259:40: error: 'SO_PEERCRED' undeclared (first use in this function)
r = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len);
^
src/core/selinux-access.c:245:22: warning: unused variable 'ucred' [-Wunused-variable]
struct ucred ucred;
^
make[2]: *** [src/core/libsystemd_core_la-selinux-access.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Diffstat (limited to 'src/core/selinux-access.c')
-rw-r--r-- | src/core/selinux-access.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c index 0ecbdf0be6..282cfd21ee 100644 --- a/src/core/selinux-access.c +++ b/src/core/selinux-access.c @@ -29,6 +29,7 @@ #include <limits.h> #include <selinux/selinux.h> #include <selinux/avc.h> +#include <sys/socket.h> #ifdef HAVE_AUDIT #include <libaudit.h> #endif |