typo
[qemu] / slirp / slirp.h
index f5c93c5..1ff68cb 100644 (file)
@@ -20,6 +20,7 @@ typedef uint32_t u_int32_t;
 typedef uint64_t u_int64_t;
 typedef char *caddr_t;
 
+# include <windows.h>
 # include <winsock2.h>
 # include <sys/timeb.h>
 # include <iphlpapi.h>
@@ -33,6 +34,7 @@ typedef char *caddr_t;
 #else
 # define ioctlsocket ioctl
 # define closesocket(s) close(s)
+# define O_BINARY 0
 #endif
 
 #include <sys/types.h>
@@ -210,6 +212,7 @@ int inet_aton _P((const char *cp, struct in_addr *ia));
 #endif
 
 #include "bootp.h"
+#include "tftp.h"
 #include "libslirp.h"
 
 extern struct ttys *ttys_unit[MAX_INTERFACES];
@@ -328,4 +331,9 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err);
 #define max(x,y) ((x) > (y) ? (x) : (y))
 #endif
 
+#ifdef _WIN32
+#undef errno
+#define errno (WSAGetLastError())
+#endif
+
 #endif