am bfe04ea0: am 8c6b848e: am 0e47a919: Merge "libc: <sys/cdefs.h>: Fix the use of __STDC_VERSION__ from C++"

* commit 'bfe04ea0e61c6905c1f6781097bddf07f843eb25':
  libc: <sys/cdefs.h>: Fix the use of __STDC_VERSION__ from C++
diff --git a/libc/Android.mk b/libc/Android.mk
index 647739e..f4f9c13 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -715,8 +715,7 @@
 LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
 LOCAL_SYSTEM_SHARED_LIBRARIES :=
 LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
-# Don't prelink
-LOCAL_PRELINK_MODULE := false
+
 # Don't install on release build
 LOCAL_MODULE_TAGS := eng debug
 
@@ -742,8 +741,7 @@
 LOCAL_SHARED_LIBRARIES := libc
 LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
 LOCAL_SYSTEM_SHARED_LIBRARIES :=
-# Don't prelink
-LOCAL_PRELINK_MODULE := false
+
 # Don't install on release build
 LOCAL_MODULE_TAGS := eng debug
 
diff --git a/libc/bionic/memmove_words.c b/libc/bionic/memmove_words.c
index 22058bc..26df7fa 100644
--- a/libc/bionic/memmove_words.c
+++ b/libc/bionic/memmove_words.c
@@ -15,6 +15,7 @@
  */
 
 #include <stdlib.h>
+#include <stdint.h>
 #include <assert.h>
 
 /*
diff --git a/libc/bionic/system_properties.c b/libc/bionic/system_properties.c
index c40950f..3bdc9bf 100644
--- a/libc/bionic/system_properties.c
+++ b/libc/bionic/system_properties.c
@@ -30,6 +30,7 @@
 #include <unistd.h>
 #include <stddef.h>
 #include <errno.h>
+#include <poll.h>
 
 #include <sys/mman.h>
 
@@ -156,15 +157,17 @@
 
 static int send_prop_msg(prop_msg *msg)
 {
+    struct pollfd pollfds[1];
     struct sockaddr_un addr;
     socklen_t alen;
     size_t namelen;
     int s;
     int r;
+    int result = -1;
 
     s = socket(AF_LOCAL, SOCK_STREAM, 0);
     if(s < 0) {
-        return -1;
+        return result;
     }
 
     memset(&addr, 0, sizeof(addr));
@@ -175,30 +178,37 @@
 
     if(TEMP_FAILURE_RETRY(connect(s, (struct sockaddr *) &addr, alen) < 0)) {
         close(s);
-        return -1;
+        return result;
     }
 
     r = TEMP_FAILURE_RETRY(send(s, msg, sizeof(prop_msg), 0));
 
     if(r == sizeof(prop_msg)) {
-        r = 0;
-    } else {
-        r = -1;
+        // We successfully wrote to the property server but now we
+        // wait for the property server to finish its work.  It
+        // acknowledges its completion by closing the socket so we
+        // poll here (on nothing), waiting for the socket to close.
+        // If you 'adb shell setprop foo bar' you'll see the POLLHUP
+        // once the socket closes.  Out of paranoia we cap our poll
+        // at 250 ms.
+        pollfds[0].fd = s;
+        pollfds[0].events = 0;
+        r = TEMP_FAILURE_RETRY(poll(pollfds, 1, 250 /* ms */));
+        if (r == 1 && (pollfds[0].revents & POLLHUP) != 0) {
+            result = 0;
+        }
     }
 
     close(s);
-    return r;
+    return result;
 }
 
 int __system_property_set(const char *key, const char *value)
 {
-    unsigned old_serial;
-    volatile unsigned *serial;
-    prop_msg msg;
     int err;
-    prop_area *pa = __system_property_area__;
     int tries = 0;
     int update_seen = 0;
+    prop_msg msg;
 
     if(key == 0) return -1;
     if(value == 0) value = "";
@@ -210,54 +220,11 @@
     strlcpy(msg.name, key, sizeof msg.name);
     strlcpy(msg.value, value, sizeof msg.value);
 
-    /* Note the system properties serial number before we do our update. */
-    const prop_info *pi = __system_property_find(key);
-    if(pi != NULL) {
-        serial = &pi->serial;
-    } else {
-        serial = &pa->serial;
-    }
-    old_serial = *serial;
-
     err = send_prop_msg(&msg);
     if(err < 0) {
         return err;
     }
 
-    /**
-     * Wait for the shared memory page to be written back and be
-     * visible in our address space before returning to the caller
-     * who might reasonably expect subsequent reads to match what was
-     * just written.
-     *
-     * Sleep 5 ms after failed checks and only wait up to a 500 ms
-     * total, just in case the system property server fails to update
-     * for whatever reason.
-     */
-    do {
-        struct timespec timeout;
-        timeout.tv_sec = 0;
-        timeout.tv_nsec = 2500000;  // 2.5 ms
-
-        if(tries++ > 0) {
-            usleep(2500); // 2.5 ms
-        }
-        __futex_wait(serial, old_serial, &timeout);
-        if(pi != NULL) {
-            unsigned new_serial = *serial;
-            /* Waiting on a specific prop_info to be updated. */
-            if (old_serial != new_serial && !SERIAL_DIRTY(new_serial)) {
-                update_seen = 1;
-            }
-        } else {
-            /* Waiting for a prop_info to be created. */
-            const prop_info *new_pi = __system_property_find(key);
-            if(new_pi != NULL && !SERIAL_DIRTY(new_pi->serial)) {
-                update_seen = 1;
-            }
-        }
-    } while (!update_seen && tries < 100);
-
     return 0;
 }
 
diff --git a/libc/include/netdb.h b/libc/include/netdb.h
index c2e08ea..eb2d99f 100644
--- a/libc/include/netdb.h
+++ b/libc/include/netdb.h
@@ -137,10 +137,7 @@
 /*
  * Error return codes from getaddrinfo()
  */
-#if 0
-/* obsoleted */
 #define	EAI_ADDRFAMILY	 1	/* address family for hostname not supported */
-#endif
 #define	EAI_AGAIN	 2	/* temporary failure in name resolution */
 #define	EAI_BADFLAGS	 3	/* invalid value for ai_flags */
 #define	EAI_FAIL	 4	/* non-recoverable failure in name resolution */
diff --git a/libc/kernel/common/linux/genetlink.h b/libc/kernel/common/linux/genetlink.h
new file mode 100644
index 0000000..bc6042c
--- /dev/null
+++ b/libc/kernel/common/linux/genetlink.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ***   To edit the content of this header, modify the corresponding
+ ***   source file (e.g. under external/kernel-headers/original/) then
+ ***   run bionic/libc/kernel/tools/update_all.py
+ ***
+ ***   Any manual change here will be lost the next time this script will
+ ***   be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_GENERIC_NETLINK_H
+#define __LINUX_GENERIC_NETLINK_H
+#include <linux/types.h>
+#include <linux/netlink.h>
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define GENL_NAMSIZ 16  
+#define GENL_MIN_ID NLMSG_MIN_TYPE
+#define GENL_MAX_ID 1023
+struct genlmsghdr {
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ __u8 cmd;
+ __u8 version;
+ __u16 reserved;
+};
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define GENL_HDRLEN NLMSG_ALIGN(sizeof(struct genlmsghdr))
+#define GENL_ADMIN_PERM 0x01
+#define GENL_CMD_CAP_DO 0x02
+#define GENL_CMD_CAP_DUMP 0x04
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define GENL_CMD_CAP_HASPOL 0x08
+#define GENL_ID_GENERATE 0
+#define GENL_ID_CTRL NLMSG_MIN_TYPE
+enum {
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ CTRL_CMD_UNSPEC,
+ CTRL_CMD_NEWFAMILY,
+ CTRL_CMD_DELFAMILY,
+ CTRL_CMD_GETFAMILY,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ CTRL_CMD_NEWOPS,
+ CTRL_CMD_DELOPS,
+ CTRL_CMD_GETOPS,
+ CTRL_CMD_NEWMCAST_GRP,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ CTRL_CMD_DELMCAST_GRP,
+ CTRL_CMD_GETMCAST_GRP,
+ __CTRL_CMD_MAX,
+};
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define CTRL_CMD_MAX (__CTRL_CMD_MAX - 1)
+enum {
+ CTRL_ATTR_UNSPEC,
+ CTRL_ATTR_FAMILY_ID,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ CTRL_ATTR_FAMILY_NAME,
+ CTRL_ATTR_VERSION,
+ CTRL_ATTR_HDRSIZE,
+ CTRL_ATTR_MAXATTR,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ CTRL_ATTR_OPS,
+ CTRL_ATTR_MCAST_GROUPS,
+ __CTRL_ATTR_MAX,
+};
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define CTRL_ATTR_MAX (__CTRL_ATTR_MAX - 1)
+enum {
+ CTRL_ATTR_OP_UNSPEC,
+ CTRL_ATTR_OP_ID,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ CTRL_ATTR_OP_FLAGS,
+ __CTRL_ATTR_OP_MAX,
+};
+#define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+enum {
+ CTRL_ATTR_MCAST_GRP_UNSPEC,
+ CTRL_ATTR_MCAST_GRP_NAME,
+ CTRL_ATTR_MCAST_GRP_ID,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ __CTRL_ATTR_MCAST_GRP_MAX,
+};
+#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
+#endif
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+
diff --git a/libc/kernel/common/linux/netfilter.h b/libc/kernel/common/linux/netfilter.h
index 0488344..ce8d394 100644
--- a/libc/kernel/common/linux/netfilter.h
+++ b/libc/kernel/common/linux/netfilter.h
@@ -7,30 +7,66 @@
  ***   structures, and macros generated from the original header, and thus,
  ***   contains no copyrightable information.
  ***
+ ***   To edit the content of this header, modify the corresponding
+ ***   source file (e.g. under external/kernel-headers/original/) then
+ ***   run bionic/libc/kernel/tools/update_all.py
+ ***
+ ***   Any manual change here will be lost the next time this script will
+ ***   be run. You've been warned!
+ ***
  ****************************************************************************
  ****************************************************************************/
 #ifndef __LINUX_NETFILTER_H
 #define __LINUX_NETFILTER_H
-
+#include <linux/types.h>
 #include <linux/compiler.h>
-
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 #define NF_DROP 0
 #define NF_ACCEPT 1
 #define NF_STOLEN 2
 #define NF_QUEUE 3
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 #define NF_REPEAT 4
 #define NF_STOP 5
 #define NF_MAX_VERDICT NF_STOP
-
 #define NF_VERDICT_MASK 0x0000ffff
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 #define NF_VERDICT_BITS 16
-
 #define NF_VERDICT_QMASK 0xffff0000
 #define NF_VERDICT_QBITS 16
-
-#define NF_QUEUE_NR(x) (((x << NF_VERDICT_QBITS) & NF_VERDICT_QMASK) | NF_QUEUE)
-
+#define NF_QUEUE_NR(x) ((((x) << NF_VERDICT_BITS) & NF_VERDICT_QMASK) | NF_QUEUE)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 #define NFC_UNKNOWN 0x4000
 #define NFC_ALTERED 0x8000
-
+enum nf_inet_hooks {
+ NF_INET_PRE_ROUTING,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ NF_INET_LOCAL_IN,
+ NF_INET_FORWARD,
+ NF_INET_LOCAL_OUT,
+ NF_INET_POST_ROUTING,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ NF_INET_NUMHOOKS
+};
+enum {
+ NFPROTO_UNSPEC = 0,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ NFPROTO_IPV4 = 2,
+ NFPROTO_ARP = 3,
+ NFPROTO_BRIDGE = 7,
+ NFPROTO_IPV6 = 10,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ NFPROTO_DECNET = 12,
+ NFPROTO_NUMPROTO,
+};
+union nf_inet_addr {
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ __u32 all[4];
+ __be32 ip;
+ __be32 ip6[4];
+ struct in_addr in;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ struct in6_addr in6;
+};
 #endif
+
diff --git a/libc/kernel/common/linux/netfilter/nfnetlink_conntrack.h b/libc/kernel/common/linux/netfilter/nfnetlink_conntrack.h
index 105dd09..0b1b356 100644
--- a/libc/kernel/common/linux/netfilter/nfnetlink_conntrack.h
+++ b/libc/kernel/common/linux/netfilter/nfnetlink_conntrack.h
@@ -7,140 +7,206 @@
  ***   structures, and macros generated from the original header, and thus,
  ***   contains no copyrightable information.
  ***
+ ***   To edit the content of this header, modify the corresponding
+ ***   source file (e.g. under external/kernel-headers/original/) then
+ ***   run bionic/libc/kernel/tools/update_all.py
+ ***
+ ***   Any manual change here will be lost the next time this script will
+ ***   be run. You've been warned!
+ ***
  ****************************************************************************
  ****************************************************************************/
 #ifndef _IPCONNTRACK_NETLINK_H
 #define _IPCONNTRACK_NETLINK_H
 #include <linux/netfilter/nfnetlink.h>
-
 enum cntl_msg_types {
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  IPCTNL_MSG_CT_NEW,
  IPCTNL_MSG_CT_GET,
  IPCTNL_MSG_CT_DELETE,
  IPCTNL_MSG_CT_GET_CTRZERO,
-
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  IPCTNL_MSG_MAX
 };
-
 enum ctnl_exp_msg_types {
  IPCTNL_MSG_EXP_NEW,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  IPCTNL_MSG_EXP_GET,
  IPCTNL_MSG_EXP_DELETE,
-
  IPCTNL_MSG_EXP_MAX
 };
-
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 enum ctattr_type {
  CTA_UNSPEC,
  CTA_TUPLE_ORIG,
  CTA_TUPLE_REPLY,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  CTA_STATUS,
  CTA_PROTOINFO,
  CTA_HELP,
  CTA_NAT_SRC,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 #define CTA_NAT CTA_NAT_SRC  
  CTA_TIMEOUT,
  CTA_MARK,
  CTA_COUNTERS_ORIG,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  CTA_COUNTERS_REPLY,
  CTA_USE,
  CTA_ID,
  CTA_NAT_DST,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ CTA_TUPLE_MASTER,
+ CTA_NAT_SEQ_ADJ_ORIG,
+ CTA_NAT_SEQ_ADJ_REPLY,
+ CTA_SECMARK,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ CTA_ZONE,
  __CTA_MAX
 };
 #define CTA_MAX (__CTA_MAX - 1)
-
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 enum ctattr_tuple {
  CTA_TUPLE_UNSPEC,
  CTA_TUPLE_IP,
  CTA_TUPLE_PROTO,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  __CTA_TUPLE_MAX
 };
 #define CTA_TUPLE_MAX (__CTA_TUPLE_MAX - 1)
-
 enum ctattr_ip {
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  CTA_IP_UNSPEC,
  CTA_IP_V4_SRC,
  CTA_IP_V4_DST,
  CTA_IP_V6_SRC,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  CTA_IP_V6_DST,
  __CTA_IP_MAX
 };
 #define CTA_IP_MAX (__CTA_IP_MAX - 1)
-
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 enum ctattr_l4proto {
  CTA_PROTO_UNSPEC,
  CTA_PROTO_NUM,
  CTA_PROTO_SRC_PORT,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  CTA_PROTO_DST_PORT,
  CTA_PROTO_ICMP_ID,
  CTA_PROTO_ICMP_TYPE,
  CTA_PROTO_ICMP_CODE,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  CTA_PROTO_ICMPV6_ID,
  CTA_PROTO_ICMPV6_TYPE,
  CTA_PROTO_ICMPV6_CODE,
  __CTA_PROTO_MAX
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 };
 #define CTA_PROTO_MAX (__CTA_PROTO_MAX - 1)
-
 enum ctattr_protoinfo {
  CTA_PROTOINFO_UNSPEC,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  CTA_PROTOINFO_TCP,
+ CTA_PROTOINFO_DCCP,
+ CTA_PROTOINFO_SCTP,
  __CTA_PROTOINFO_MAX
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 };
 #define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1)
-
 enum ctattr_protoinfo_tcp {
  CTA_PROTOINFO_TCP_UNSPEC,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  CTA_PROTOINFO_TCP_STATE,
+ CTA_PROTOINFO_TCP_WSCALE_ORIGINAL,
+ CTA_PROTOINFO_TCP_WSCALE_REPLY,
+ CTA_PROTOINFO_TCP_FLAGS_ORIGINAL,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ CTA_PROTOINFO_TCP_FLAGS_REPLY,
  __CTA_PROTOINFO_TCP_MAX
 };
 #define CTA_PROTOINFO_TCP_MAX (__CTA_PROTOINFO_TCP_MAX - 1)
-
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+enum ctattr_protoinfo_dccp {
+ CTA_PROTOINFO_DCCP_UNSPEC,
+ CTA_PROTOINFO_DCCP_STATE,
+ CTA_PROTOINFO_DCCP_ROLE,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ CTA_PROTOINFO_DCCP_HANDSHAKE_SEQ,
+ __CTA_PROTOINFO_DCCP_MAX,
+};
+#define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+enum ctattr_protoinfo_sctp {
+ CTA_PROTOINFO_SCTP_UNSPEC,
+ CTA_PROTOINFO_SCTP_STATE,
+ CTA_PROTOINFO_SCTP_VTAG_ORIGINAL,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ CTA_PROTOINFO_SCTP_VTAG_REPLY,
+ __CTA_PROTOINFO_SCTP_MAX
+};
+#define CTA_PROTOINFO_SCTP_MAX (__CTA_PROTOINFO_SCTP_MAX - 1)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 enum ctattr_counters {
  CTA_COUNTERS_UNSPEC,
  CTA_COUNTERS_PACKETS,
  CTA_COUNTERS_BYTES,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  CTA_COUNTERS32_PACKETS,
  CTA_COUNTERS32_BYTES,
  __CTA_COUNTERS_MAX
 };
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 #define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1)
-
 enum ctattr_nat {
  CTA_NAT_UNSPEC,
  CTA_NAT_MINIP,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  CTA_NAT_MAXIP,
  CTA_NAT_PROTO,
  __CTA_NAT_MAX
 };
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 #define CTA_NAT_MAX (__CTA_NAT_MAX - 1)
-
 enum ctattr_protonat {
  CTA_PROTONAT_UNSPEC,
  CTA_PROTONAT_PORT_MIN,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  CTA_PROTONAT_PORT_MAX,
  __CTA_PROTONAT_MAX
 };
 #define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1)
-
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+enum ctattr_natseq {
+ CTA_NAT_SEQ_UNSPEC,
+ CTA_NAT_SEQ_CORRECTION_POS,
+ CTA_NAT_SEQ_OFFSET_BEFORE,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ CTA_NAT_SEQ_OFFSET_AFTER,
+ __CTA_NAT_SEQ_MAX
+};
+#define CTA_NAT_SEQ_MAX (__CTA_NAT_SEQ_MAX - 1)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 enum ctattr_expect {
  CTA_EXPECT_UNSPEC,
  CTA_EXPECT_MASTER,
  CTA_EXPECT_TUPLE,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  CTA_EXPECT_MASK,
  CTA_EXPECT_TIMEOUT,
  CTA_EXPECT_ID,
  CTA_EXPECT_HELP_NAME,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ CTA_EXPECT_ZONE,
  __CTA_EXPECT_MAX
 };
 #define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1)
-
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 enum ctattr_help {
  CTA_HELP_UNSPEC,
  CTA_HELP_NAME,
  __CTA_HELP_MAX
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 };
 #define CTA_HELP_MAX (__CTA_HELP_MAX - 1)
-
 #endif
+
diff --git a/libc/netbsd/gethnamaddr.c b/libc/netbsd/gethnamaddr.c
index 3ebe53e..728801f 100644
--- a/libc/netbsd/gethnamaddr.c
+++ b/libc/netbsd/gethnamaddr.c
@@ -67,6 +67,7 @@
 #include <netdb.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include <strings.h>
 #include <syslog.h>
 
 #ifndef LOG_AUTH
diff --git a/libc/netbsd/net/getaddrinfo.c b/libc/netbsd/net/getaddrinfo.c
index edb4f70..cf05036 100644
--- a/libc/netbsd/net/getaddrinfo.c
+++ b/libc/netbsd/net/getaddrinfo.c
@@ -97,6 +97,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <unistd.h>
 
 #include <syslog.h>
diff --git a/libc/netbsd/net/nsdispatch.c b/libc/netbsd/net/nsdispatch.c
index fa99366..15282be 100644
--- a/libc/netbsd/net/nsdispatch.c
+++ b/libc/netbsd/net/nsdispatch.c
@@ -84,6 +84,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <unistd.h>
 
 static nss_method
diff --git a/libc/netbsd/resolv/res_debug.c b/libc/netbsd/resolv/res_debug.c
index 721e015..46e583b 100644
--- a/libc/netbsd/resolv/res_debug.c
+++ b/libc/netbsd/resolv/res_debug.c
@@ -123,6 +123,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <time.h>
 
 
diff --git a/libc/unistd/exec.c b/libc/unistd/exec.c
index cbb98b3..a50185f 100644
--- a/libc/unistd/exec.c
+++ b/libc/unistd/exec.c
@@ -36,6 +36,7 @@
 #include <limits.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <stdio.h>
 #include <paths.h>
 #include <stdarg.h>
diff --git a/libc/zoneinfo/zoneinfo.dat b/libc/zoneinfo/zoneinfo.dat
index 6b2bada..6e31d38 100644
--- a/libc/zoneinfo/zoneinfo.dat
+++ b/libc/zoneinfo/zoneinfo.dat
Binary files differ
diff --git a/libc/zoneinfo/zoneinfo.idx b/libc/zoneinfo/zoneinfo.idx
index 535251e..3a8bf97 100644
--- a/libc/zoneinfo/zoneinfo.idx
+++ b/libc/zoneinfo/zoneinfo.idx
Binary files differ
diff --git a/libc/zoneinfo/zoneinfo.version b/libc/zoneinfo/zoneinfo.version
index 1bec5a4..9deeb11 100644
--- a/libc/zoneinfo/zoneinfo.version
+++ b/libc/zoneinfo/zoneinfo.version
@@ -1 +1 @@
-2011b
+2011d
diff --git a/linker/Android.mk b/linker/Android.mk
index da311cd..abe5995 100644
--- a/linker/Android.mk
+++ b/linker/Android.mk
@@ -76,8 +76,6 @@
 LOCAL_MODULE_CLASS := EXECUTABLES
 LOCAL_MODULE_SUFFIX := $(TARGET_EXECUTABLE_SUFFIX)
 
-# Executables are not prelinked.
-LOCAL_PRELINK_MODULE := false
 
 include $(BUILD_SYSTEM)/dynamic_binary.mk