#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
+#include <sys/ioctl.h>
#endif
#include <errno.h>
#include "protocol.h"
-#include <sys/ioctl.h>
-
#define BUFFER_SIZE 4
/* Top-level command opcodes */
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;
}
return (status < 1) ? FALSE : TRUE;
-#endif // __WIN32__
+#endif
}
SR_PRIV struct ipdbg_la_tcp *ipdbg_la_tcp_new(void)