mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-26 10:49:21 +00:00
fix build on win32
This commit is contained in:
parent
8ca74c4eac
commit
f0d77218c8
@ -822,7 +822,7 @@ fd_nonblock(fd)
|
||||
int fd;
|
||||
{
|
||||
#if defined USE_FIONBIO && defined FIONBIO
|
||||
int opt = 1;
|
||||
ioctlsockopt_t opt = 1;
|
||||
|
||||
ioctlsocket(fd, FIONBIO, &opt);
|
||||
#else
|
||||
@ -839,7 +839,7 @@ fd_block(fd)
|
||||
int fd;
|
||||
{
|
||||
#if defined USE_FIONBIO && defined FIONBIO
|
||||
int opt = 0;
|
||||
ioctlsockopt_t opt = 0;
|
||||
|
||||
ioctlsocket(fd, FIONBIO, &opt);
|
||||
#else
|
||||
|
@ -19,19 +19,29 @@ typedef uint16_t u_int16_t;
|
||||
typedef uint32_t u_int32_t;
|
||||
typedef uint64_t u_int64_t;
|
||||
typedef char *caddr_t;
|
||||
typedef int socklen_t;
|
||||
typedef unsigned long ioctlsockopt_t;
|
||||
|
||||
# include <windows.h>
|
||||
# include <winsock2.h>
|
||||
# include <sys/timeb.h>
|
||||
# include <iphlpapi.h>
|
||||
|
||||
# define USE_FIONBIO 1
|
||||
# define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
# define EINPROGRESS WSAEINPROGRESS
|
||||
# define ENOTCONN WSAENOTCONN
|
||||
# define EHOSTUNREACH WSAEHOSTUNREACH
|
||||
# define ENETUNREACH WSAENETUNREACH
|
||||
# define ECONNREFUSED WSAECONNREFUSED
|
||||
|
||||
/* Basilisk II Router defines those */
|
||||
# define udp_read_completion slirp_udp_read_completion
|
||||
# define write_udp slirp_write_udp
|
||||
# define init_udp slirp_init_udp
|
||||
# define final_udp slirp_final_udp
|
||||
#else
|
||||
typedef int ioctlsockopt_t;
|
||||
# define ioctlsocket ioctl
|
||||
# define closesocket(s) close(s)
|
||||
# define O_BINARY 0
|
||||
|
@ -415,7 +415,8 @@ sorecvfrom(so)
|
||||
udp_detach(so);
|
||||
} else { /* A "normal" UDP packet */
|
||||
struct mbuf *m;
|
||||
int len, n;
|
||||
int len;
|
||||
ioctlsockopt_t n;
|
||||
|
||||
if (!(m = m_get())) return;
|
||||
m->m_data += if_maxlinkhdr;
|
||||
|
Loading…
Reference in New Issue
Block a user