From: g0dil Date: Tue, 25 Nov 2008 12:55:23 +0000 (+0000) Subject: Socket/Protocols: (hopefully) fix sockaddr alignment issues on 64bit X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=00742c20f70026875a3561aeb9ba29eeb7274da9;p=senf.git Socket/Protocols: (hopefully) fix sockaddr alignment issues on 64bit git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@978 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Socket/Protocols/BSDSocketAddress.hh b/Socket/Protocols/BSDSocketAddress.hh index 5afd329..9fbc5f0 100644 --- a/Socket/Protocols/BSDSocketAddress.hh +++ b/Socket/Protocols/BSDSocketAddress.hh @@ -27,6 +27,8 @@ #define HH_SENF_Socket_Protocols_BSDSocketAddress_ 1 // Custom includes +#include +#include #include "../../Utils/safe_bool.hh" #include #include @@ -113,7 +115,10 @@ namespace senf { private: - socklen_t len_; + union { + socklen_t len_; + boost::type_with_alignment::value> _; + }; }; /** \brief Safe socket address down-cast