about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--resolv/nss_dns/dns-network.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f1084eed12..4c8d7bc6c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2016-04-27  Florian Weimer  <fweimer@redhat.com>
 
+	* resolv/nss_dns/dns-network.c (offsetof): Remove macro
+	definition.  Include <stddef.h> instead.
+
+2016-04-27  Florian Weimer  <fweimer@redhat.com>
+
 	[BZ #19831]
 	* resolv/nss_dns/dns-host.c (rrtype_to_rdata_length): New
 	function.
diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c
index 8f301a706b..99ec7555ab 100644
--- a/resolv/nss_dns/dns-network.c
+++ b/resolv/nss_dns/dns-network.c
@@ -62,6 +62,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdint.h>
+#include <stddef.h>
 
 #include "nsswitch.h"
 #include <arpa/inet.h>
@@ -234,9 +235,6 @@ _nss_dns_getnetbyaddr_r (uint32_t net, int type, struct netent *result,
 }
 
 
-#undef offsetof
-#define offsetof(Type, Member) ((size_t) &((Type *) NULL)->Member)
-
 static enum nss_status
 getanswer_r (const querybuf *answer, int anslen, struct netent *result,
 	     char *buffer, size_t buflen, int *errnop, int *h_errnop,