[05/18] posix: Rewrite to use struct scratch_buffer instead of extend_alloca
Commit Message
Adhemerval Zanella wrote:
> + p = getpwnam (pwtmpbuf.data);
That won't work on non-glibc platforms that lack getpwnam_r, as the argument
should be 'name'. I installed the attached patch to Gnulib to fix this.
From 88855bf9f1cfc2e5165e4200bf62aa949e76db90 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sat, 2 Sep 2017 03:37:46 -0700
Subject: [PATCH] glob: fix typo in recent change
* lib/glob.c (glob) [!HAVE_GETPWNAM_R && !_LIBC]:
Fix recently-introduced typo.
---
ChangeLog | 4 ++++
lib/glob.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
@@ -1,5 +1,9 @@
2017-09-02 Paul Eggert <eggert@cs.ucla.edu>
+ glob: fix typo in recent change
+ * lib/glob.c (glob) [!HAVE_GETPWNAM_R && !_LIBC]:
+ Fix recently-introduced typo.
+
glob: don't save and restore errno unnecessarily
* lib/glob.c (glob): Don't save and restore errno
merely because we have getpwnam_r.
@@ -658,7 +658,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int),
}
}
# else
- p = getpwnam (pwtmpbuf.data);
+ p = getpwnam (name);
# endif
if (p != NULL)
{
--
2.7.4