--- qemu-1.4.0/block/vvfat.c.orig 2013-02-16 00:05:35.000000000 +0100 +++ qemu-1.4.0/block/vvfat.c 2013-02-25 17:19:47.799428900 +0100 @@ -821,7 +821,13 @@ static inline uint32_t sector2cluster(BDRVVVFATState* s,off_t sector_num) { - return (sector_num-s->faked_sectors)/s->sectors_per_cluster; + uint32_t ret; + + if (sector_num < s->faked_sectors) + ret = 0; + else + ret = (sector_num-s->faked_sectors)/s->sectors_per_cluster; + return ret; } static inline off_t cluster2sector(BDRVVVFATState* s, uint32_t cluster_num) --- qemu-1.4.0/configure.orig 2013-02-16 00:05:35.000000000 +0100 +++ qemu-1.4.0/configure 2013-02-25 17:20:58.565506800 +0100 @@ -416,7 +416,7 @@ CYGWIN*) mingw32="yes" QEMU_CFLAGS="-mno-cygwin $QEMU_CFLAGS" - audio_possible_drivers="winwave sdl" + audio_possible_drivers="winwave dsound sdl fmod" audio_drv_list="winwave" ;; MINGW32*) @@ -2388,14 +2388,12 @@ ########################################## # opengl probe, used by milkymist-tmu2 if test "$opengl" != "no" ; then - opengl_libs="-lGL -lX11" + opengl_libs="-opengl32" cat > $TMPC << EOF -#include #include -#include int main(void) { return GL_VERSION != 0; } EOF - if compile_prog "" "-lGL" ; then + if compile_prog "" "-lopengl32" ; then opengl=yes else if test "$opengl" = "yes" ; then --- qemu-1.4.0/Makefile.objs.orig 2013-02-25 18:19:13.579664600 +0100 +++ qemu-1.4.0/Makefile.objs 2013-02-25 18:19:53.954923000 +0100 @@ -27,6 +27,8 @@ endif block-obj-$(CONFIG_WIN32) += coroutine-win32.o +block-obj-$(CONFIG_WIN32) += version.o + ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) # Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add. # only pull in the actual virtio-9p device if we also enabled virtio. --- qemu-1.4.0/Makefile.orig 2013-02-16 00:05:35.000000000 +0100 +++ qemu-1.4.0/Makefile 2013-02-25 17:22:00.503403000 +0100 @@ -131,7 +131,7 @@ $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pixman V="$(V)" all,) pixman/Makefile: $(SRC_PATH)/pixman/configure - (cd pixman; CFLAGS="$(CFLAGS) -fPIC $(extra_cflags) $(extra_ldflags)" $(SRC_PATH)/pixman/configure $(AUTOCONF_HOST) --disable-gtk --disable-shared --enable-static) + (cd pixman; CFLAGS="$(CFLAGS) $(extra_cflags) $(extra_ldflags)" $(SRC_PATH)/pixman/configure $(AUTOCONF_HOST) --disable-gtk --disable-shared --enable-static) $(SRC_PATH)/pixman/configure: (cd $(SRC_PATH)/pixman; autoreconf -v --install) @@ -148,8 +148,8 @@ bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS) -version.o: $(SRC_PATH)/version.rc config-host.h - $(call quiet-command,$(WINDRES) -I. -o $@ $<," RC $(TARGET_DIR)$@") +version.o: $(SRC_PATH)/version.rc config-host.h qemu.ico + $(call quiet-command,$(WINDRES) -I. -o $@ '$(shell cygpath -w $<)'," RC $(TARGET_DIR)$@") version-obj-$(CONFIG_WIN32) += version.o Makefile: $(version-obj-y) @@ -164,9 +164,9 @@ qemu-img.o: qemu-img-cmds.h -qemu-img$(EXESUF): qemu-img.o $(block-obj-y) libqemuutil.a libqemustub.a -qemu-nbd$(EXESUF): qemu-nbd.o $(block-obj-y) libqemuutil.a libqemustub.a -qemu-io$(EXESUF): qemu-io.o cmd.o $(block-obj-y) libqemuutil.a libqemustub.a +qemu-img$(EXESUF): qemu-img.o $(block-obj-y) $(version-obj-y) libqemuutil.a libqemustub.a +qemu-nbd$(EXESUF): qemu-nbd.o $(block-obj-y) $(version-obj-y) libqemuutil.a libqemustub.a +qemu-io$(EXESUF): qemu-io.o cmd.o $(block-obj-y) $(version-obj-y) libqemuutil.a libqemustub.a qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o @@ -298,6 +298,7 @@ $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)" install-sysconfig: install-datadir install-confdir + $(INSTALL_DATA) $(SRC_PATH)/qemu.ico "$(DESTDIR)$(qemu_confdir)" $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)" install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig install-datadir --- qemu-1.4.0/qemu-char.c.orig 2013-02-16 00:05:35.000000000 +0100 +++ qemu-1.4.0/qemu-char.c 2013-02-25 17:19:47.815054000 +0100 @@ -515,6 +515,12 @@ return len1 - len; } +static CharDriverState *qemu_chr_open_fd(int fd_in, int fd_out) +{ + /* NOT AVAILABLE */ + return NULL; +} + #else int send_all(int fd, const void *_buf, int len1) @@ -537,6 +543,7 @@ } return len1 - len; } + #endif /* !_WIN32 */ #define STDIO_MAX_CLIENTS 1 --- qemu-1.4.0/ui/vnc-enc-tight.c.orig 2013-02-16 00:05:35.000000000 +0100 +++ qemu-1.4.0/ui/vnc-enc-tight.c 2013-02-25 17:19:47.830679100 +0100 @@ -50,6 +50,8 @@ #include "vnc-enc-tight.h" #include "vnc-palette.h" +typedef unsigned int uint; + /* Compression level stuff. The following array contains various encoder parameters for each of 10 compression levels (0..9). Last three parameters correspond to JPEG quality levels (0..9). */ --- qemu-1.4.0/version.rc.orig 2013-02-16 00:05:35.000000000 +0100 +++ qemu-1.4.0/version.rc 2013-02-25 17:19:47.830679100 +0100 @@ -1,6 +1,7 @@ #include #include "config-host.h" +500 ICON "qemu.ico" VS_VERSION_INFO VERSIONINFO FILEVERSION CONFIG_FILEVERSION PRODUCTVERSION CONFIG_PRODUCTVERSION