From 2d1251329fd37f0d0c92ece1ee4e1c89b9998589 Mon Sep 17 00:00:00 2001 From: gio Date: Thu, 9 Jul 2015 09:26:11 +0000 Subject: [PATCH] Add ss_family to sockaddr_storage and align to 64bit --- nbase/nbase_ipv6.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/nbase/nbase_ipv6.h b/nbase/nbase_ipv6.h index 507bd35c1..7fd16f660 100644 --- a/nbase/nbase_ipv6.h +++ b/nbase/nbase_ipv6.h @@ -177,13 +177,10 @@ const char *inet_ntop(int af, const void *src, char *dst, size_t size); #endif /* HAVE_INET_NTOP */ #ifndef HAVE_SOCKADDR_STORAGE - /* Just needs to be big enough to hold sockaddr_in or - sockaddr_in6. I should really align it at 64 bits, but 32 is - probably fine as hosts that actually want to store a - sockaddr_in6 in here should already have this defined (see - RFC2355). */ struct sockaddr_storage { - u32 padding[32]; + u16 ss_family; + u16 __align_to_64[3]; + u64 __padding[16]; }; #endif /* SOCKADDR_STORAGE */