Skip to content
Snippets Groups Projects
Commit 42c14ca5 authored by g0dil's avatar g0dil
Browse files

Socket/Protocols: (hopefully) fix sockaddr alignment issues on 64bit

parent 9aaed4a7
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,8 @@
#define HH_SENF_Socket_Protocols_BSDSocketAddress_ 1
// Custom includes
#include <boost/type_traits/alignment_of.hpp>
#include <boost/type_traits/type_with_alignment.hpp>
#include "../../Utils/safe_bool.hh"
#include <sys/socket.h>
#include <iostream>
......@@ -113,7 +115,10 @@ namespace senf {
private:
socklen_t len_;
union {
socklen_t len_;
boost::type_with_alignment<boost::alignment_of<struct sockaddr_storage>::value> _;
};
};
/** \brief Safe socket address down-cast
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment