diff options
Diffstat (limited to 'freebsd/lib/libc/net/getprotoent.c')
-rw-r--r-- | freebsd/lib/libc/net/getprotoent.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/freebsd/lib/libc/net/getprotoent.c b/freebsd/lib/libc/net/getprotoent.c index d0a7a97e..774ae95a 100644 --- a/freebsd/lib/libc/net/getprotoent.c +++ b/freebsd/lib/libc/net/getprotoent.c @@ -36,7 +36,6 @@ static char sccsid[] = "@(#)getprotoent.c 8.1 (Berkeley) 6/4/93"; __FBSDID("$FreeBSD$"); #include <rtems/bsd/sys/param.h> -#include <sys/types.h> #include <sys/socket.h> #include <errno.h> #include <limits.h> @@ -344,7 +343,7 @@ void __setprotoent_p(int f, struct protoent_data *ped) { if (ped->fp == NULL) - ped->fp = fopen(_PATH_PROTOCOLS, "r"); + ped->fp = fopen(_PATH_PROTOCOLS, "re"); else rewind(ped->fp); ped->stayopen |= f; @@ -367,7 +366,7 @@ __getprotoent_p(struct protoent *pe, struct protoent_data *ped) char *cp, **q, *endp; long l; - if (ped->fp == NULL && (ped->fp = fopen(_PATH_PROTOCOLS, "r")) == NULL) + if (ped->fp == NULL && (ped->fp = fopen(_PATH_PROTOCOLS, "re")) == NULL) return (-1); again: if ((p = fgets(ped->line, sizeof ped->line, ped->fp)) == NULL) |