[COMMITTED PATCH] NaCl: Fix glob.c build after getlogin_r -> __getlogin_r.
Mike Frysinger
vapier@gentoo.org
Mon Jul 6 09:51:00 GMT 2015
On 29 Jun 2015 22:38, Tolga Dalman wrote:
> On 06/25/2015 12:30 AM, Roland McGrath wrote:
> > -#include <unistd.h> /* Declares getlogin_r. */
> > +#include <unistd.h> /* Declares __getlogin_r. */
>
> The change itself is good, though I wonder why the include is needed at all.
> Would you help me understand ?
because this file does:
#define __getlogin_r(name, len) (ENOSYS)
#include <sysdeps/wordsize-64/glob.c>
if the later glob.c files include unistd.h, then the preprocessor will produce
invalid code. the prototype will go from something like:
extern int __getlogin_r (char *__name, size_t __name_len) __nonnull ((1));
to:
extern int (ENOSYS) __nonnull ((1));
note: i didn't load up the exact source to see what line(s) would fail, but if
you're interested, you should be able to reproduce :)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150706/c83c35c2/attachment.sig>
More information about the Libc-alpha
mailing list