summaryrefslogtreecommitdiff
path: root/libgcompat
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-10-26 22:36:43 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2017-10-26 22:36:43 -0500
commit03c6a554cf066cc24eeb009d4233f4e5117a513c (patch)
tree5339ba3ce05679d14a3b737f865fae850e8768eb /libgcompat
parentf127620f3e34d7c8462d908c5bc0a4d101d00daa (diff)
downloadgcompat-03c6a554cf066cc24eeb009d4233f4e5117a513c.tar.gz
gcompat-03c6a554cf066cc24eeb009d4233f4e5117a513c.tar.bz2
gcompat-03c6a554cf066cc24eeb009d4233f4e5117a513c.tar.xz
gcompat-03c6a554cf066cc24eeb009d4233f4e5117a513c.zip
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
Diffstat (limited to 'libgcompat')
-rw-r--r--libgcompat/sysctl.c8
1 files 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 <errno.h>
-#include <string.h>
-#include <unistd.h>
+#include <unistd.h> /* size_t */
#include <sys/syscall.h>
+#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 */