diff options
Diffstat (limited to 'libc/sysdeps/linux/common/sysctl.c')
-rw-r--r-- | libc/sysdeps/linux/common/sysctl.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/common/sysctl.c b/libc/sysdeps/linux/common/sysctl.c index 3cd4f5e41..adee22837 100644 --- a/libc/sysdeps/linux/common/sysctl.c +++ b/libc/sysdeps/linux/common/sysctl.c @@ -8,6 +8,8 @@ */ #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 |