typedef uint64_t u_int64_t;
typedef char *caddr_t;
+# include <windows.h>
# include <winsock2.h>
# include <sys/timeb.h>
# include <iphlpapi.h>
#else
# define ioctlsocket ioctl
# define closesocket(s) close(s)
+# define O_BINARY 0
#endif
#include <sys/types.h>
#define max(x,y) ((x) > (y) ? (x) : (y))
#endif
+#ifdef _WIN32
+#undef errno
+#define errno (WSAGetLastError())
+#endif
+
#endif