From: Stefan Weil Date: Sat, 10 Mar 2012 10:14:31 +0000 (+0100) Subject: w64: Don't redefine lseek, ftruncate X-Git-Tag: v1.1-rc0~255 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=371c6489000c2eba959aaebcb134a12ffec93c88;p=thirdparty%2Fqemu.git 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 Signed-off-by: Blue Swirl --- diff --git a/qemu-common.h b/qemu-common.h index dbfce6f4c62..b0fdf5c2b45 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) {