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/sys/socket.h b/libc/include/sys/socket.h
index 22b88cb..9402e70 100644
--- a/libc/include/sys/socket.h
+++ b/libc/include/sys/socket.h
@@ -39,6 +39,7 @@
#include <linux/types.h>
#include <linux/compiler.h>
+#include <bits/sockaddr_storage.h>
#include <bits/sa_family_t.h>
__BEGIN_DECLS
@@ -72,15 +73,6 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnullability-completeness"
-struct sockaddr_storage {
- union {
- struct {
- sa_family_t ss_family;
- char __data[128 - sizeof(sa_family_t)];
- };
- void* __align;
- };
-};
struct linger {
int l_onoff;