Andrew Geissler | d1d22e6 | 2020-10-16 10:14:32 -0500 | [diff] [blame^] | 1 | From 47263a3a74d7973e7a54b17db6aa903701468ffd Mon Sep 17 00:00:00 2001 |
| 2 | From: Patrick Steinhardt <ps@pks.im> |
| 3 | Date: Sat, 3 Oct 2020 20:37:55 +0200 |
| 4 | Subject: [PATCH] libapparmor: add missing include for `socklen_t` |
| 5 | |
| 6 | While `include/sys/apparmor.h` makes use of `socklen_t`, it doesn't |
| 7 | include the `<sys/socket.h>` header to make its declaration available. |
| 8 | While this works on systems using glibc via transitive includes, it |
| 9 | breaks compilation on musl libc. |
| 10 | |
| 11 | Fix the issue by including the header. |
| 12 | |
| 13 | Signed-off-by: Patrick Steinhardt <ps@pks.im> |
| 14 | |
| 15 | Upstream-Status: Backport |
| 16 | Signed-off-by: Armin Kuster <akuster808@gmail.com> |
| 17 | |
| 18 | --- |
| 19 | libraries/libapparmor/include/sys/apparmor.h | 1 + |
| 20 | 1 file changed, 1 insertion(+) |
| 21 | |
| 22 | diff --git a/libraries/libapparmor/include/sys/apparmor.h b/libraries/libapparmor/include/sys/apparmor.h |
| 23 | index 32892d06..d70eff94 100644 |
| 24 | --- a/libraries/libapparmor/include/sys/apparmor.h |
| 25 | +++ b/libraries/libapparmor/include/sys/apparmor.h |
| 26 | @@ -21,6 +21,7 @@ |
| 27 | #include <stdbool.h> |
| 28 | #include <stdint.h> |
| 29 | #include <unistd.h> |
| 30 | +#include <sys/socket.h> |
| 31 | #include <sys/types.h> |
| 32 | |
| 33 | #ifdef __cplusplus |
| 34 | -- |
| 35 | 2.17.1 |
| 36 | |