summaryrefslogtreecommitdiff
path: root/libc/getent
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>1998-02-01 11:26:21 +0100
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:40:14 +0200
commit48f0b3eb836162d41622cedc1eb5f5168168fb8e (patch)
treec53156383d4682a0a296f6611575dbc1d64d1881 /libc/getent
parent48798bf2eb93ec3b99720ac2e16093441156653d (diff)
downloaddev86-48f0b3eb836162d41622cedc1eb5f5168168fb8e.tar.gz
Import Dev86src-0.13.5.tar.gzv0.13.5
Diffstat (limited to 'libc/getent')
-rw-r--r--libc/getent/pwent.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/getent/pwent.c b/libc/getent/pwent.c
index fd65db2..738c87a 100644
--- a/libc/getent/pwent.c
+++ b/libc/getent/pwent.c
@@ -53,6 +53,8 @@ endpwent(void)
struct passwd *
getpwent(void)
{
+ if (pw_fd==-1)
+ setpwent();
if (pw_fd!=-1)
return __getpwent(pw_fd);
return NULL;