diff options
Diffstat (limited to 'lib/libc/net/getprotoent.c')
-rw-r--r-- | lib/libc/net/getprotoent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/getprotoent.c b/lib/libc/net/getprotoent.c index 0cfca45..114069a 100644 --- a/lib/libc/net/getprotoent.c +++ b/lib/libc/net/getprotoent.c @@ -342,7 +342,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; @@ -365,7 +365,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) |