aboutsummaryrefslogtreecommitdiff
path: root/qemu-common.h
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2012-03-10 11:14:31 +0100
committerBlue Swirl <blauwirbel@gmail.com>2012-03-11 11:27:30 +0000
commit371c6489000c2eba959aaebcb134a12ffec93c88 (patch)
tree16d83348e95b309e1ad3f858223796f8e9f937b0 /qemu-common.h
parente04b28996110bd6acfc059e9f2c8c5aba5119a46 (diff)
downloadqemu-371c6489000c2eba959aaebcb134a12ffec93c88.zip
qemu-371c6489000c2eba959aaebcb134a12ffec93c88.tar.gz
qemu-371c6489000c2eba959aaebcb134a12ffec93c88.tar.bz2
w64: Don't redefine lseek, ftruncate
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>
Diffstat (limited to 'qemu-common.h')
-rw-r--r--qemu-common.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/qemu-common.h b/qemu-common.h
index dbfce6f..b0fdf5c 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -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)
{