diff options
Diffstat (limited to 'libc/sysdeps/linux/common/sysctl.c')
-rw-r--r-- | libc/sysdeps/linux/common/sysctl.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/libc/sysdeps/linux/common/sysctl.c b/libc/sysdeps/linux/common/sysctl.c index 0d6f49185..adee22837 100644 --- a/libc/sysdeps/linux/common/sysctl.c +++ b/libc/sysdeps/linux/common/sysctl.c @@ -7,7 +7,9 @@ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ -#include "syscalls.h" +#include <sys/syscall.h> +#if defined __NR__sysctl && (defined __USE_GNU || defined __USE_BSD) + /* psm: including sys/sysctl.h would depend on kernel headers */ extern int sysctl (int *__name, int __nlen, void *__oldval, size_t *__oldlenp, void *__newval, size_t __newlen) __THROW; @@ -29,13 +31,14 @@ int sysctl(int *name, int nlen, void *oldval, size_t * oldlenp, void *newval, size_t newlen) { struct __sysctl_args args = { - name:name, - nlen:nlen, - oldval:oldval, - oldlenp:oldlenp, - newval:newval, - newlen:newlen + .name = name, + .nlen = nlen, + .oldval = oldval, + .oldlenp = oldlenp, + .newval = newval, + .newlen = newlen }; return _sysctl(&args); } +#endif |