From 03c6a554cf066cc24eeb009d4233f4e5117a513c Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 26 Oct 2017 22:36:43 -0500 Subject: sysctl: clean headers, ensure SYS__sysctl is def'd Linux/aarch64 does not define SYS__sysctl. This caused build errors in Alpine[1] and Void[2]. While I'm in here, fix up headers since we don't need errno or strings. [1]: https://git.alpinelinux.org/cgit/aports/commit/?id=400a9d40 [2]: https://github.com/voidlinux/void-packages/commit/a7aa924e --- libgcompat/sysctl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libgcompat/sysctl.c b/libgcompat/sysctl.c index 5671055..a14c2b8 100644 --- a/libgcompat/sysctl.c +++ b/libgcompat/sysctl.c @@ -1,9 +1,9 @@ -#include -#include -#include +#include /* size_t */ #include +#ifdef SYS__sysctl + struct __sysctl_args { int *name; int nlen; @@ -26,3 +26,5 @@ int sysctl (int *name, int nlen, void *oldval, size_t *oldlenp, void *newval, si return syscall(SYS__sysctl, &args); } + +#endif /* SYS__sysctl */ -- cgit v1.2.3-60-g2f50