mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Fix some warnings found cross-compiling with mingw32
This commit is contained in:
parent
b738ee189f
commit
6810908a5f
6
buffer.c
6
buffer.c
@ -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;
|
||||||
|
4
evutil.c
4
evutil.c
@ -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
|
||||||
|
|
||||||
|
@ -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];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user