Remember that in a fit of ANSI C compliance, Microsoft decided to
screw portability by renaming basically all the functions in unistd.h to
get prefixed with an understore.
For some reason, mingw didn't seem to mind, but at least some people's
compilers did: see bug
3044490.
#define u16 ev_uint16_t
#define u8 ev_uint8_t
-#ifdef WIN32
-#define open _open
-#define read _read
-#define close _close
-#endif
-
/* maximum number of addresses from a single packet */
/* that we bother recording */
#define MAX_V4_ADDRS 32
#include "strlcpy-internal.h"
#include "ipv6-internal.h"
+#ifdef WIN32
+#define open _open
+#define read _read
+#define close _close
+#define fstat _fstat
+#define stat _stat
+#endif
+
/**
Read the contents of 'filename' into a newly allocated NUL-terminated
string. Set *content_out to hold this string, and *len_out to hold its