aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>1998-03-09 04:34:16 +0000
committerJohn Birrell <jb@FreeBSD.org>1998-03-09 04:34:16 +0000
commit59fe2e5fd03f3863bb0f6414078ed2127312a745 (patch)
tree6ebd5af44c2441db561c62a421d42f4a41558c87 /lib
parent84d6500535a3d7d272ae6379908a34691b174db5 (diff)
downloadsrc-59fe2e5fd03f3863bb0f6414078ed2127312a745.tar.gz
src-59fe2e5fd03f3863bb0f6414078ed2127312a745.zip
Change a variable to type size_t to suit the sysctl prototype.
Add #include <string.h> to get prototypes.
Notes
Notes: svn path=/head/; revision=34358
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/sysctlbyname.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/gen/sysctlbyname.c b/lib/libc/gen/sysctlbyname.c
index 9c4f34653cc0..0e6720740795 100644
--- a/lib/libc/gen/sysctlbyname.c
+++ b/lib/libc/gen/sysctlbyname.c
@@ -6,11 +6,12 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: sysctlbyname.c,v 1.1 1997/05/30 20:53:13 phk Exp $
+ * $Id: sysctlbyname.c,v 1.2 1997/07/12 11:14:30 peter Exp $
*
*/
#include <sys/types.h>
#include <sys/sysctl.h>
+#include <string.h>
int
sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp,
@@ -18,7 +19,8 @@ sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp,
{
int name2oid_oid[2];
int real_oid[CTL_MAXNAME+2];
- int error, oidlen;
+ int error;
+ size_t oidlen;
name2oid_oid[0] = 0; /* This is magic & undocumented! */
name2oid_oid[1] = 3;