about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-01-01 09:35:45 +0100
committerFlorian Weimer <fweimer@redhat.com>2017-01-01 09:35:45 +0100
commit73dfd088936b9237599e4ab737c7ae2ea7d710e1 (patch)
treede96e43069dd623849846b0afc0b21bb3a2dcc63
parent8e2c31b57fc8ade88e2d3f64c007bce49ed82daa (diff)
downloadglibc-73dfd088936b9237599e4ab737c7ae2ea7d710e1.tar.gz
glibc-73dfd088936b9237599e4ab737c7ae2ea7d710e1.tar.xz
glibc-73dfd088936b9237599e4ab737c7ae2ea7d710e1.zip
support: struct netent portability fix for support_format_netent
-rw-r--r--ChangeLog5
-rw-r--r--support/support_format_netent.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b7508b36d..8a163cc770 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2017-01-01  Florian Weimer  <fweimer@redhat.com>
 
+	* support/support_format_netent.c (support_format_netent): Work
+	around alpha struct netent definition difference.
+
+2017-01-01  Florian Weimer  <fweimer@redhat.com>
+
 	* support/xwrite.c (xwrite): Use %td for pointer difference.
 
 2017-01-01  Florian Weimer  <fweimer@redhat.com>
diff --git a/support/support_format_netent.c b/support/support_format_netent.c
index 73cd0fee61..020f5720d9 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;