ipdbg-la: Fix data_available() implementation on Windows.
[...]/protocol.c: In function 'data_available': [...]/protocol.c:73:38: error: 'bytes_available' undeclared (first use in this function) ioctlsocket(tcp->socket, FIONREAD, &bytes_available); ^ [...]/protocol.c:73:38: note: each undeclared identifier is reported only once for each function it appears in [...]/protocol.c:84:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^
This commit is contained in:
parent
24fbd9f814
commit
3bfdadf6df
|
@ -70,7 +70,9 @@
|
|||
static gboolean data_available(struct ipdbg_la_tcp *tcp)
|
||||
{
|
||||
#ifdef __WIN32__
|
||||
u_long bytes_available;
|
||||
ioctlsocket(tcp->socket, FIONREAD, &bytes_available);
|
||||
return (bytes_available > 0);
|
||||
#else
|
||||
int status;
|
||||
|
||||
|
@ -80,7 +82,7 @@ static gboolean data_available(struct ipdbg_la_tcp *tcp)
|
|||
}
|
||||
|
||||
return (status < 1) ? FALSE : TRUE;
|
||||
#endif // __WIN32__
|
||||
#endif
|
||||
}
|
||||
|
||||
SR_PRIV struct ipdbg_la_tcp *ipdbg_la_tcp_new(void)
|
||||
|
|
Loading…
Reference in New Issue