Use the canonical idiom for sockaddr_storage.
This works out a bit silly/ugly because the bits/ header file has the
wrong name, so I've also changed the map from kernel struct to boolean
to be a map from kernel struct to filename. That not only fixes this,
it's a bit more readable too. (Just yesterday, when I had no real reason
to change it, I was asking myself "why is this a boolean?"!)
Bug: http://b/236042740
Test: treehugger
Change-Id: I3eee25b493ea97d46cc5dc5fde07f7c5e77d2a46
diff --git a/libc/include/netinet/in.h b/libc/include/netinet/in.h
index b235e6e..163e614 100644
--- a/libc/include/netinet/in.h
+++ b/libc/include/netinet/in.h
@@ -33,20 +33,10 @@
#include <sys/cdefs.h>
#include <sys/socket.h>
-// Include linux/socket.h first to trigger the header guard without
-// the__kernel_sockaddr_storage define, so its definition uses the
-// kernel name.
-#include <linux/socket.h>
-
-// Redefine __kernel_sockaddr_storage to sockaddr_storage so that
-// the structs defined in linux/in.h use the sockaddr_storage defined
-// in sys/sockets.h.
-#define __kernel_sockaddr_storage sockaddr_storage
#include <linux/in.h>
-#undef __kernel_sockaddr_storage
-
#include <linux/in6.h>
#include <linux/ipv6.h>
+#include <linux/socket.h>
__BEGIN_DECLS