diff options
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/getgrouplist.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/getpwent.c | 5 | ||||
-rw-r--r-- | lib/libc/gen/sem.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/semctl.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/sysctl.c | 3 | ||||
-rw-r--r-- | lib/libc/gen/unvis.c | 2 |
6 files changed, 10 insertions, 6 deletions
diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c index 52ee620..40d55fc 100644 --- a/lib/libc/gen/getgrouplist.c +++ b/lib/libc/gen/getgrouplist.c @@ -69,7 +69,7 @@ getgrouplist(uname, agroup, groups, grpcnt) * Scan the group file to find additional groups. */ setgrent(); - while (grp = getgrent()) { + while ((grp = getgrent()) != NULL) { for (i = 0; i < ngroups; i++) { if (grp->gr_gid == groups[i]) goto skip; diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index a3bfed8..cf7c644 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include <string.h> #include <limits.h> #include <nsswitch.h> +#include <netdb.h> #ifdef HESIOD #include <hesiod.h> #endif @@ -64,10 +65,6 @@ __FBSDID("$FreeBSD$"); #endif #include "un-namespace.h" -extern void setnetgrent(char *); -extern int getnetgrent(char **, char **, char **); -extern int innetgr(const char *, const char *, const char *, const char *); - #include "pw_scan.h" #if defined(YP) || defined(HESIOD) diff --git a/lib/libc/gen/sem.c b/lib/libc/gen/sem.c index d1cf10e..e37eccd 100644 --- a/lib/libc/gen/sem.c +++ b/lib/libc/gen/sem.c @@ -29,6 +29,7 @@ * $FreeBSD$ */ +#include "namespace.h" #include <stdlib.h> #include <errno.h> #include <fcntl.h> @@ -37,6 +38,7 @@ #include <pthread.h> #include <sys/queue.h> #include <_semaphore.h> +#include "un-namespace.h" #define _SEM_CHECK_VALIDITY(sem) \ if ((*(sem))->magic != SEM_MAGIC) { \ diff --git a/lib/libc/gen/semctl.c b/lib/libc/gen/semctl.c index 0322743..4b5283f 100644 --- a/lib/libc/gen/semctl.c +++ b/lib/libc/gen/semctl.c @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include <stdarg.h> #include <stdlib.h> +extern int __semctl(int semid, int semnum, int cmd, union semun *arg); + int semctl(int semid, int semnum, int cmd, ...) { va_list ap; diff --git a/lib/libc/gen/sysctl.c b/lib/libc/gen/sysctl.c index ad39ff6..525175a1 100644 --- a/lib/libc/gen/sysctl.c +++ b/lib/libc/gen/sysctl.c @@ -47,6 +47,9 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> #include <string.h> +extern int __sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, + void *newp, size_t newlen); + int sysctl(name, namelen, oldp, oldlenp, newp, newlen) int *name; diff --git a/lib/libc/gen/unvis.c b/lib/libc/gen/unvis.c index df6b18f..94a6726 100644 --- a/lib/libc/gen/unvis.c +++ b/lib/libc/gen/unvis.c @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); #define S_HTTP 0x080 /* %HEXHEX escape */ #define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7') -#define ishex(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '9' || ((u_char)(c)) >= 'a' && ((u_char)(c)) <= 'f') +#define ishex(c) ((((u_char)(c)) >= '0' && ((u_char)(c)) <= '9') || (((u_char)(c)) >= 'a' && ((u_char)(c)) <= 'f')) /* * unvis - decode characters previously encoded by vis |