aboutsummaryrefslogtreecommitdiff
path: root/lib/setup.h
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2004-12-16 21:27:29 +0000
committerGisle Vanem <gvanem@broadpark.no>2004-12-16 21:27:29 +0000
commitf71725de6e0b4890f85f9f623684a876b9fdfdd8 (patch)
treeb2970d27870b165fa73ff2c61d4a6236aa1330f0 /lib/setup.h
parent26fe6da93bfbc80e34878fbab899959d15d70194 (diff)
Must include <io.h> and <sys/stat.h> before redefining
stat(), fstat() and lseek().
Diffstat (limited to 'lib/setup.h')
-rw-r--r--lib/setup.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/setup.h b/lib/setup.h
index b02469976..c494ce25e 100644
--- a/lib/setup.h
+++ b/lib/setup.h
@@ -135,8 +135,11 @@ typedef unsigned char bool;
/* To make large file support transparent even on Windows */
#if defined(WIN32) && (SIZEOF_CURL_OFF_T > 4)
+#include <sys/stat.h> /* must come first before we redefine stat() */
+#include <io.h>
#define lseek(x,y,z) _lseeki64(x, y, z)
#define struct_stat struct _stati64
+#define stat(file,st) _stati64(file,st)
#define fstat(fd,st) _fstati64(fd,st)
#else
#define struct_stat struct stat