projects
/
qemu
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
typo
[qemu]
/
slirp
/
slirp.h
diff --git
a/slirp/slirp.h
b/slirp/slirp.h
index
f5c93c5
..
1ff68cb
100644
(file)
--- a/
slirp/slirp.h
+++ b/
slirp/slirp.h
@@
-20,6
+20,7
@@
typedef uint32_t u_int32_t;
typedef uint64_t u_int64_t;
typedef char *caddr_t;
typedef uint64_t u_int64_t;
typedef char *caddr_t;
+# include <windows.h>
# include <winsock2.h>
# include <sys/timeb.h>
# include <iphlpapi.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)
#else
# define ioctlsocket ioctl
# define closesocket(s) close(s)
+# define O_BINARY 0
#endif
#include <sys/types.h>
#endif
#include <sys/types.h>
@@
-210,6
+212,7
@@
int inet_aton _P((const char *cp, struct in_addr *ia));
#endif
#include "bootp.h"
#endif
#include "bootp.h"
+#include "tftp.h"
#include "libslirp.h"
extern struct ttys *ttys_unit[MAX_INTERFACES];
#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
#define max(x,y) ((x) > (y) ? (x) : (y))
#endif
+#ifdef _WIN32
+#undef errno
+#define errno (WSAGetLastError())
+#endif
+
#endif
#endif