diff options
author | jb <jb@FreeBSD.org> | 1998-03-09 04:34:16 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 1998-03-09 04:34:16 +0000 |
commit | 632617caf9df11e6e2e70f90aa148d425abec850 (patch) | |
tree | e01cb303919325edb69973769bbba86eeea0f84a | |
parent | e08356d7d1b7d193a1d58dcc25d58978cafd01f9 (diff) | |
download | FreeBSD-src-632617caf9df11e6e2e70f90aa148d425abec850.zip FreeBSD-src-632617caf9df11e6e2e70f90aa148d425abec850.tar.gz |
Change a variable to type size_t to suit the sysctl prototype.
Add #include <string.h> to get prototypes.
-rw-r--r-- | lib/libc/gen/sysctlbyname.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/gen/sysctlbyname.c b/lib/libc/gen/sysctlbyname.c index 9c4f346..0e67207 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; |