diff options
Diffstat (limited to 'libc/inet/getservice.c')
-rw-r--r-- | libc/inet/getservice.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/inet/getservice.c b/libc/inet/getservice.c index ee408dfab..fb22ff95a 100644 --- a/libc/inet/getservice.c +++ b/libc/inet/getservice.c @@ -163,12 +163,14 @@ int getservent_r(struct servent * result_buf, if (servf == NULL && (servf = fopen(_PATH_SERVICES, "r" )) == NULL) { UNLOCK; + errno=EIO; return errno; } again: if ((p = fgets(line, BUFSIZ, servf)) == NULL) { UNLOCK; - return TRY_AGAIN; + errno=EIO; + return errno; } if (*p == '#') goto again; |