summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-01-22 13:57:32 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-01-22 13:57:32 +0100
commit8a2d6677c3d485e5cbc19a6a550ead83990f2b5d (patch)
tree66c1d358ef7e062c4f3607a2c8a0ae1c72e5f9f7
parent2b69e9906e5087a796b3a15e9aabcd102c705b19 (diff)
silence warning about implicit decl of sysctl
... and reinstate comment explaining the gory details Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r--libc/sysdeps/linux/common/sysctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/sysctl.c b/libc/sysdeps/linux/common/sysctl.c
index f65a3eaa2..dde00be46 100644
--- a/libc/sysdeps/linux/common/sysctl.c
+++ b/libc/sysdeps/linux/common/sysctl.c
@@ -10,6 +10,7 @@
#include <sys/syscall.h>
#if defined __NR__sysctl && (defined __USE_GNU || defined __USE_BSD)
+/* psm: including sys/sysctl.h would depend on kernel headers */
struct __sysctl_args {
int *name;
int nlen;
@@ -19,7 +20,8 @@ struct __sysctl_args {
size_t newlen;
unsigned long __unused[4];
};
-
+extern int sysctl (int *__name, int __nlen, void *__oldval,
+ size_t *__oldlenp, void *__newval, size_t __newlen) __THROW;
int sysctl(int *name, int nlen, void *oldval, size_t * oldlenp,
void *newval, size_t newlen)
{