mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
Cast pointer arguments of get/setsockopt, send to void * to keep GCC
from producing a warning about pointer type mismatches with Winsock Signed-off-by: malc <av1474@comtv.ru>
This commit is contained in:
parent
9f8fd69460
commit
0a656f5f21
3 changed files with 4 additions and 3 deletions
3
nbd.c
3
nbd.c
|
@ -169,7 +169,8 @@ int tcp_socket_incoming(const char *address, uint16_t port)
|
|||
memcpy(&addr.sin_addr.s_addr, &in, sizeof(in));
|
||||
|
||||
opt = 1;
|
||||
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1) {
|
||||
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
|
||||
(const void *) &opt, sizeof(opt)) == -1) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue