mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
listen: Fix strict-aliasing warning on GCC 4.1
This commit is contained in:
parent
880a139cc1
commit
12fcba7b4c
1 changed files with 5 additions and 1 deletions
|
@ -106,9 +106,13 @@ rops_handle_POLLIN_listen(struct lws_context_per_thread *pt, struct lws *wsi,
|
|||
ntohs(((struct sockaddr_in *) &cli_addr)->sin_port)),
|
||||
accept_fd);
|
||||
#else
|
||||
{
|
||||
struct sockaddr_in sain;
|
||||
memcpy(&sain, &cli_addr, sizeof(sain));
|
||||
lwsl_debug("accepted new conn port %u on fd=%d\n",
|
||||
ntohs(((struct sockaddr_in *) &cli_addr)->sin_port),
|
||||
ntohs(sain.sin_port),
|
||||
accept_fd);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue