Always include <sys/cdefs.h>.
I made a mistake caught by code review earlier, so let's try to be
safer by default.
This patch also moves all our "forwarding" headers to the guardless
just-include-the-other-thing style that we usually use. (Where we
have a comment explaining where the header comes from, I've kept
that.)
Change-Id: I37342cf5e2563c6a269b2ba61a697069b1c7913b
diff --git a/libc/include/netinet/icmp6.h b/libc/include/netinet/icmp6.h
index e3e6e9a..eca7b45 100644
--- a/libc/include/netinet/icmp6.h
+++ b/libc/include/netinet/icmp6.h
@@ -66,6 +66,7 @@
#define _NETINET_ICMP6_H_
#include <netinet/in.h> /* android-added: glibc source compatibility. */
+#include <sys/cdefs.h>
#define ICMPV6_PLD_MAXLEN 1232 /* IPV6_MMTU - sizeof(struct ip6_hdr)
- sizeof(struct icmp6_hdr) */
diff --git a/libc/include/netinet/in_systm.h b/libc/include/netinet/in_systm.h
index 188268e..8da19a5 100644
--- a/libc/include/netinet/in_systm.h
+++ b/libc/include/netinet/in_systm.h
@@ -34,6 +34,7 @@
#ifndef _NETINET_IN_SYSTM_H_
#define _NETINET_IN_SYSTM_H_
+#include <sys/cdefs.h>
#include <sys/types.h>
/*
diff --git a/libc/include/netinet/ip6.h b/libc/include/netinet/ip6.h
index 52fcfae..639637e 100644
--- a/libc/include/netinet/ip6.h
+++ b/libc/include/netinet/ip6.h
@@ -64,6 +64,7 @@
#ifndef _NETINET_IP6_H_
#define _NETINET_IP6_H_
+#include <sys/cdefs.h>
#include <sys/types.h>
#include <linux/in6.h>
diff --git a/libc/include/netinet/udp.h b/libc/include/netinet/udp.h
index d4eb368..ef517d6 100644
--- a/libc/include/netinet/udp.h
+++ b/libc/include/netinet/udp.h
@@ -29,6 +29,7 @@
#ifndef _NETINET_UDP_H
#define _NETINET_UDP_H
+#include <sys/cdefs.h>
#include <sys/types.h>
#include <linux/udp.h>