DEV9: fix some missing includes and nonportable u_long type use

This commit is contained in:
psykose 2023-12-29 23:31:36 +00:00 committed by Connor McLaughlin
parent 69ac4ddedc
commit 182375314e
3 changed files with 5 additions and 3 deletions

View File

@ -80,7 +80,7 @@ namespace Sessions
int err = 0;
int recived;
u_long available;
unsigned long available;
#ifdef _WIN32
err = ioctlsocket(client, FIONREAD, &available);
#elif defined(__POSIX__)

View File

@ -8,6 +8,7 @@
#define SOCKET_ERROR -1
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/select.h>
#include <netinet/in.h>
#endif
@ -132,7 +133,7 @@ namespace Sessions
if (hasData)
{
u_long available = 0;
unsigned long available = 0;
PayloadData* recived = nullptr;
std::unique_ptr<u8[]> buffer;
sockaddr endpoint{0};

View File

@ -8,6 +8,7 @@
#define SOCKET_ERROR -1
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/select.h>
#include <netinet/in.h>
#endif
@ -119,7 +120,7 @@ namespace Sessions
if (hasData)
{
u_long available = 0;
unsigned long available = 0;
PayloadData* recived = nullptr;
std::unique_ptr<u8[]> buffer;
sockaddr endpoint{0};