Browse Source

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>
Bernhard Reutner-Fischer 15 years ago
parent
commit
8a2d6677c3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      libc/sysdeps/linux/common/sysctl.c

+ 3 - 1
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)
 {