aboutsummaryrefslogtreecommitdiffstats
path: root/libc/dns/gethnamaddr.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/dns/gethnamaddr.c')
-rw-r--r--libc/dns/gethnamaddr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/dns/gethnamaddr.c b/libc/dns/gethnamaddr.c
index 80fdcbee1..cc33c612c 100644
--- a/libc/dns/gethnamaddr.c
+++ b/libc/dns/gethnamaddr.c
@@ -899,7 +899,7 @@ _sethtent(int f)
res_static rs = __res_get_static();
if (rs == NULL) return;
if (!rs->hostf)
- rs->hostf = fopen(_PATH_HOSTS, "r" );
+ rs->hostf = fopen(_PATH_HOSTS, "re" );
else
rewind(rs->hostf);
rs->stayopen = f;
@@ -925,7 +925,7 @@ _gethtent(void)
int af, len;
res_static rs = __res_get_static();
- if (!rs->hostf && !(rs->hostf = fopen(_PATH_HOSTS, "r" ))) {
+ if (!rs->hostf && !(rs->hostf = fopen(_PATH_HOSTS, "re" ))) {
h_errno = NETDB_INTERNAL;
return NULL;
}