mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 14:02:05 -06:00
slirp: use socket_set_nonblock
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
b72210568e
commit
1c5970a8b8
2 changed files with 3 additions and 47 deletions
|
@ -336,7 +336,7 @@ int tcp_fconnect(struct socket *so)
|
|||
int opt, s=so->s;
|
||||
struct sockaddr_in addr;
|
||||
|
||||
fd_nonblock(s);
|
||||
socket_set_nonblock(s);
|
||||
opt = 1;
|
||||
setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(opt ));
|
||||
opt = 1;
|
||||
|
@ -424,7 +424,7 @@ tcp_connect(struct socket *inso)
|
|||
tcp_close(sototcpcb(so)); /* This will sofree() as well */
|
||||
return;
|
||||
}
|
||||
fd_nonblock(s);
|
||||
socket_set_nonblock(s);
|
||||
opt = 1;
|
||||
setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int));
|
||||
opt = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue