Fix some warnings found cross-compiling with mingw32

This commit is contained in:
Nick Mathewson 2012-11-01 18:05:27 -04:00
parent b738ee189f
commit 6810908a5f
3 changed files with 20 additions and 0 deletions

View File

@ -2894,9 +2894,15 @@ evbuffer_file_segment_new(
seg->file_offset = offset; seg->file_offset = offset;
#ifdef _WIN32 #ifdef _WIN32
#ifndef lseek
#define lseek _lseeki64 #define lseek _lseeki64
#endif
#ifndef fstat
#define fstat _fstat #define fstat _fstat
#endif
#ifndef stat
#define stat _stat #define stat _stat
#endif
#endif #endif
if (length == -1) { if (length == -1) {
struct stat st; struct stat st;

View File

@ -89,8 +89,12 @@
#define open _open #define open _open
#define read _read #define read _read
#define close _close #define close _close
#ifndef fstat
#define fstat _fstati64 #define fstat _fstati64
#endif
#ifndef stat
#define stat _stati64 #define stat _stati64
#endif
#define mode_t int #define mode_t int
#endif #endif

View File

@ -48,12 +48,22 @@
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
#ifndef stat
#define stat _stat #define stat _stat
#endif
#ifndef fstat
#define fstat _fstat #define fstat _fstat
#endif
#ifndef open
#define open _open #define open _open
#endif
#ifndef close
#define close _close #define close _close
#endif
#ifndef O_RDONLY
#define O_RDONLY _O_RDONLY #define O_RDONLY _O_RDONLY
#endif #endif
#endif
char uri_root[512]; char uri_root[512];