mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
build: strict-aliasing on old compiler workaround
https://github.com/warmcat/libwebsockets/issues/1067
This commit is contained in:
parent
1c70181ca2
commit
4afeefbb3c
1 changed files with 5 additions and 1 deletions
|
@ -2265,7 +2265,11 @@ lws_socket_bind(struct lws_vhost *vhost, lws_sockfd_type sockfd, int port,
|
|||
ntohs(((struct sockaddr_in6 *) &sin)->sin6_port) :
|
||||
ntohs(((struct sockaddr_in *) &sin)->sin_port);
|
||||
#else
|
||||
port = ntohs(((struct sockaddr_in *) &sin)->sin_port);
|
||||
{
|
||||
struct sockaddr_in sain;
|
||||
memcpy(&sain, &sin, sizeof(sain));
|
||||
port = ntohs(sain.sin_port);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue