diff options
Diffstat (limited to 'freebsd/lib/libc/net/gethostbyht.c')
-rw-r--r-- | freebsd/lib/libc/net/gethostbyht.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/freebsd/lib/libc/net/gethostbyht.c b/freebsd/lib/libc/net/gethostbyht.c index f373fcbd..80a66922 100644 --- a/freebsd/lib/libc/net/gethostbyht.c +++ b/freebsd/lib/libc/net/gethostbyht.c @@ -74,7 +74,7 @@ void _sethosthtent(int f, struct hostent_data *hed) { if (!hed->hostf) - hed->hostf = fopen(_PATH_HOSTS, "r"); + hed->hostf = fopen(_PATH_HOSTS, "re"); else rewind(hed->hostf); hed->stayopen = f; @@ -98,7 +98,7 @@ gethostent_p(struct hostent *he, struct hostent_data *hed, int mapped, int af, len; char hostbuf[BUFSIZ + 1]; - if (!hed->hostf && !(hed->hostf = fopen(_PATH_HOSTS, "r"))) { + if (!hed->hostf && !(hed->hostf = fopen(_PATH_HOSTS, "re"))) { RES_SET_H_ERRNO(statp, NETDB_INTERNAL); return (-1); } |