]> git.proxmox.com Git - qemu.git/commitdiff
w64: Don't redefine lseek, ftruncate
authorStefan Weil <sw@weilnetz.de>
Sat, 10 Mar 2012 10:14:31 +0000 (11:14 +0100)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 11 Mar 2012 11:27:30 +0000 (11:27 +0000)
MinGW-w64 already defines lseek and ftruncate (and uses the 64 bit
variants). The conditional compilation avoids redefinitions
(which would be wrong) and compiler warnings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qemu-common.h

index dbfce6f4c6213edf9463b1575d7173f8b0c3f88c..b0fdf5c2b45412030a985c6d9afd312144c0e532 100644 (file)
@@ -93,9 +93,13 @@ typedef int (*fprintf_function)(FILE *f, const char *fmt, ...)
 
 #ifdef _WIN32
 #define fsync _commit
-#define lseek _lseeki64
+#if !defined(lseek)
+# define lseek _lseeki64
+#endif
 int qemu_ftruncate64(int, int64_t);
-#define ftruncate qemu_ftruncate64
+#if !defined(ftruncate)
+# define ftruncate qemu_ftruncate64
+#endif
 
 static inline char *realpath(const char *path, char *resolved_path)
 {