about summary refs log tree commit diff
path: root/pwd/fgetpwent_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'pwd/fgetpwent_r.c')
-rw-r--r--pwd/fgetpwent_r.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pwd/fgetpwent_r.c b/pwd/fgetpwent_r.c
index c2a746d902..33f49ea1ae 100644
--- a/pwd/fgetpwent_r.c
+++ b/pwd/fgetpwent_r.c
@@ -86,6 +86,7 @@ __fgetpwent_r (FILE *stream, struct passwd *resbuf, char *buffer,
 	{
 	  funlockfile (stream);
 	  *result = NULL;
+	  __set_errno (ENOENT);
 	  return errno;
 	}
       if (p == NULL || buffer[buflen - 1] != '\xff')