1 /* vi: set sw=4 ts=4: */
5 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
7 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
10 #include <sys/syscall.h>
11 #if defined __NR__sysctl && (defined __USE_GNU || defined __USE_BSD)
13 /* psm: including sys/sysctl.h would depend on kernel headers */
14 struct __sysctl_args {
21 unsigned long __unused[4];
23 extern int sysctl (int *__name, int __nlen, void *__oldval,
24 size_t *__oldlenp, void *__newval, size_t __newlen) __THROW;
25 int sysctl(int *name, int nlen, void *oldval, size_t * oldlenp,
26 void *newval, size_t newlen)
28 /* avoid initializing on the stack as gcc will call memset() */
29 struct __sysctl_args args;
33 args.oldlenp = oldlenp;
36 return INLINE_SYSCALL(_sysctl, 1, &args);