This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH COMMITTED] support: struct netent portability fix for support_format_netent
- From: fweimer at redhat dot com (Florian Weimer)
- To: libc-alpha at sourceware dot org
- Date: Sun, 01 Jan 2017 10:21:42 +0100
- Subject: [PATCH COMMITTED] support: struct netent portability fix for support_format_netent
- Authentication-results: sourceware.org; auth=none
2017-01-01 Florian Weimer <fweimer@redhat.com>
* support/support_format_netent.c (support_format_netent): Work
around alpha struct netent definition difference.
diff --git a/support/support_format_netent.c b/support/support_format_netent.c
index 73cd0fe..020f572 100644
--- a/support/support_format_netent.c
+++ b/support/support_format_netent.c
@@ -43,7 +43,9 @@ support_format_netent (struct netent *e)
fprintf (mem.out, "alias: %s\n", *ap);
if (e->n_addrtype != AF_INET)
fprintf (mem.out, "addrtype: %d\n", e->n_addrtype);
- fprintf (mem.out, "net: 0x%08x\n", e->n_net);
+ /* On alpha, e->n_net is an unsigned long. */
+ unsigned int n_net = e->n_net;
+ fprintf (mem.out, "net: 0x%08x\n", n_net);
xfclose_memstream (&mem);
return mem.buffer;