This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Compiling glibc, I get this warning: ../sysdeps/unix/sysv/linux/sysctl.c:32: warning: no previous prototype for `__sysctl' But what's the best place to add __sysctl since it's Linux specific? I propose the appended patch - ok to commit it? Andreas 2001-01-21 Andreas Jaeger <aj@suse.de> * sysdeps/unix/sysv/linux/sysctl.c: Include libc-internal.h for prototype. * include/libc-internal.h (__sysctl): Add prototype declaration. ============================================================ Index: include/libc-internal.h --- include/libc-internal.h 2000/12/31 19:12:37 1.3 +++ include/libc-internal.h 2001/01/21 17:25:38 @@ -4,6 +4,8 @@ #ifndef _LIBC_INTERNAL # define _LIBC_INTERNAL 1 +#include <stddef.h> + /* Initialize the `__libc_enable_secure' flag. */ extern void __libc_init_secure (void); @@ -23,5 +25,9 @@ /* Free all allocated resources. */ extern void __libc_freeres (void); + +/* Read or write system parameters (Linux specific). */ +extern int __sysctl (int *__name, int __nlen, void *__oldval, + size_t *__oldlenp, void *__newval, size_t __newlen); #endif /* _LIBC_INTERNAL */ ============================================================ Index: sysdeps/unix/sysv/linux/sysctl.c --- sysdeps/unix/sysv/linux/sysctl.c 2000/07/11 19:30:53 1.6 +++ sysdeps/unix/sysv/linux/sysctl.c 2001/01/21 17:25:38 @@ -1,5 +1,5 @@ /* Read or write system information. Linux version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ Boston, MA 02111-1307, USA. */ #include <errno.h> +#include <libc-internal.h> #include <sys/sysctl.h> #include <sysdep.h> -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |