Index: Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/Makefile,v retrieving revision 1.95 diff -u -p -r1.95 Makefile --- Makefile 2 Aug 2008 18:29:39 -0000 1.95 +++ Makefile 24 Sep 2008 20:57:16 -0000 @@ -6,15 +6,14 @@ # PORTNAME= qemu -PORTVERSION= 0.9.1s.20080620 -PORTREVISION= 1 +PORTVERSION= 0.9.1s.20080924 CATEGORIES= emulators MASTER_SITES= http://bellard.org/qemu/:release \ http://qemu-forum.ipi.fi/qemu-snapshots/:snapshot \ http://people.fruitsalad.org/nox/qemu/:snapshot \ ${MASTER_SITE_LOCAL}:snapshot PKGNAMESUFFIX= -devel -DISTNAME= ${PORTNAME}-snapshot-2008-06-20_19 +DISTNAME= ${PORTNAME}-snapshot-2008-09-24_21 DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:snapshot DIST_SUBDIR= qemu EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} @@ -44,23 +43,23 @@ OPTIONS= KQEMU "Build with (alpha!) acce .include .if defined(WITHOUT_ALL_TARGETS) -CONFIGURE_ARGS+= --disable-gcc-check --target-list=i386-softmmu,sparc-softmmu,x86_64-softmmu,mips-softmmu,mipsel-softmmu,mips64-softmmu,mips64el-softmmu,arm-softmmu,m68k-softmmu,cris-softmmu +CONFIGURE_ARGS+= --disable-gcc-check --target-list=i386-softmmu,sparc-softmmu,x86_64-softmmu,mips-softmmu,mipsel-softmmu,mips64-softmmu,mips64el-softmmu,arm-softmmu,m68k-softmmu,cris-softmmu,sh4-softmmu,sh4eb-softmmu PLIST_SUB+= DYNGEN="@comment " .else USE_GCC= 3.4 PLIST_SUB+= DYNGEN="" .endif -.if ${OSVERSION} < 600000 -# 5.x base gcc segfaults in target-mips/op_mem.c -BUILD_DEPENDS+= gcc34:${PORTSDIR}/lang/gcc34 -CC= gcc34 -.endif - WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//} CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC} +.if ${OSVERSION} < 700000 +MAKE_ARGS+= OS_LDFLAGS=-lthr # kse seems to have issues with signals +.else +MAKE_ARGS+= OS_LDFLAGS=${PTHREAD_LIBS} +.endif + .if defined(WITHOUT_SDL) CONFIGURE_ARGS+= --disable-sdl --disable-gfx-check .else @@ -118,12 +117,12 @@ post-patch: @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/cdrom-dma-patch .endif @${REINPLACE_CMD} -E \ - -e "s,^(CFLAGS=).*,\1${CFLAGS} -fno-strict-aliasing," \ - -e "s,^(LDFLAGS=).*,\1${LDFLAGS}," \ + -e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing|" \ + -e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \ ${WRKSRC}/Makefile.target @${REINPLACE_CMD} -E \ - -e "s,^(CFLAGS=).*,\1${CFLAGS} -fno-strict-aliasing -I.," \ - -e "s,^(LDFLAGS=).*,\1${LDFLAGS}," \ + -e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing -I.|" \ + -e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \ ${WRKSRC}/Makefile post-install: Index: distinfo =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/distinfo,v retrieving revision 1.50 diff -u -p -r1.50 distinfo --- distinfo 8 Jul 2008 18:42:08 -0000 1.50 +++ distinfo 24 Sep 2008 20:15:26 -0000 @@ -1,3 +1,3 @@ -MD5 (qemu/qemu-snapshot-2008-06-20_19.tar.bz2) = 7201553586b59e400664b2f9ae0b17a1 -SHA256 (qemu/qemu-snapshot-2008-06-20_19.tar.bz2) = e9a3654976b923c471f572961f244f2758d15a367cfc1b32054aa2cd4391cace -SIZE (qemu/qemu-snapshot-2008-06-20_19.tar.bz2) = 2629290 +MD5 (qemu/qemu-snapshot-2008-09-24_21.tar.bz2) = 96c6a4ea882b4139ea0d3e43684790a8 +SHA256 (qemu/qemu-snapshot-2008-09-24_21.tar.bz2) = 5cf1d78c203e27b7cbf263b09c037478b8c5636a001d4c8b26bbc08a95be625e +SIZE (qemu/qemu-snapshot-2008-09-24_21.tar.bz2) = 2729684 Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/pkg-plist,v retrieving revision 1.25 diff -u -p -r1.25 pkg-plist --- pkg-plist 8 Jul 2008 18:42:08 -0000 1.25 +++ pkg-plist 24 Sep 2008 20:14:30 -0000 @@ -10,8 +10,8 @@ bin/qemu-system-mipsel %%DYNGEN%%bin/qemu-system-ppc %%DYNGEN%%bin/qemu-system-ppc64 %%DYNGEN%%bin/qemu-system-ppcemb -%%DYNGEN%%bin/qemu-system-sh4 -%%DYNGEN%%bin/qemu-system-sh4eb +bin/qemu-system-sh4 +bin/qemu-system-sh4eb bin/qemu-system-sparc bin/qemu-system-x86_64 @unexec if cmp -s %D/etc/qemu-ifup.sample %D/etc/qemu-ifup; then rm -f %D/etc/qemu-ifup; fi @@ -30,6 +30,7 @@ etc/qemu-ifdown.sample %%DATADIR%%/openbios-sparc32 %%DATADIR%%/openbios-sparc64 %%DATADIR%%/video.x +%%DATADIR%%/pxe-e1000.bin %%DATADIR%%/pxe-ne2k_pci.bin %%DATADIR%%/pxe-rtl8139.bin %%DATADIR%%/pxe-pcnet.bin Index: files/patch-Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-Makefile,v retrieving revision 1.6 diff -u -p -r1.6 patch-Makefile --- files/patch-Makefile 8 Jul 2008 18:42:09 -0000 1.6 +++ files/patch-Makefile 24 Sep 2008 20:31:01 -0000 @@ -11,6 +11,15 @@ Index: qemu/Makefile else DOCS= endif +@@ -127,7 +130,7 @@ + AUDIO_OBJS += paaudio.o + endif + ifdef AUDIO_PT +-LDFLAGS += -pthread ++#LDFLAGS += -pthread + endif + ifdef AUDIO_PT_INT + AUDIO_OBJS += audio_pt_int.o @@ -203,13 +211,13 @@ common de-ch es fo fr-ca hu ja mk nl-be pt sl tr Index: files/patch-bsdusb.patch =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-bsdusb.patch,v retrieving revision 1.10 diff -u -p -r1.10 patch-bsdusb.patch --- files/patch-bsdusb.patch 11 Mar 2008 23:34:13 -0000 1.10 +++ files/patch-bsdusb.patch 24 Sep 2008 20:14:30 -0000 @@ -36,15 +36,15 @@ Index: qemu/configure for target in $target_list; do target_dir="$target" Index: qemu/Makefile -@@ -58,7 +58,7 @@ - OBJS+=ssd0303.o ssd0323.o ads7846.o stellaris_input.o +@@ -75,7 +75,7 @@ + OBJS+=tmp105.o lm832x.o OBJS+=scsi-disk.o cdrom.o OBJS+=scsi-generic.o --OBJS+=usb.o usb-hub.o usb-linux.o usb-hid.o usb-msd.o usb-wacom.o usb-serial.o -+OBJS+=usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o usb-serial.o +-OBJS+=usb.o usb-hub.o usb-linux.o usb-hid.o usb-msd.o usb-wacom.o ++OBJS+=usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o + OBJS+=usb-serial.o usb-net.o OBJS+=sd.o ssi-sd.o - ifdef CONFIG_WIN32 Index: qemu/usb-stub.c @@ -0,0 +1,11 @@ +#include "vl.h" @@ -59,7 +59,7 @@ Index: qemu/usb-stub.c + return NULL; +} Index: qemu/usb-bsd.c -@@ -0,0 +1,601 @@ +@@ -0,0 +1,607 @@ +/* + * BSD host USB redirector + * @@ -661,31 +661,9 @@ Index: qemu/usb-bsd.c +{ + usb_host_scan(NULL, usb_host_info_device); +} -Index: qemu/usb-linux.c -@@ -23,7 +23,6 @@ - */ - #include "vl.h" - --#if defined(__linux__) - #include - #include - #include -@@ -505,18 +504,3 @@ - { - usb_host_scan(NULL, usb_host_info_device); - } -- --#else -- --void usb_host_info(void) --{ -- term_printf("USB host devices not supported\n"); --} -- --/* XXX: modify configure to compile the right host driver */ --USBDevice *usb_host_device_open(const char *devname) --{ -- return NULL; --} -- --#endif ++ ++/* XXX add this */ ++int usb_host_device_close(const char *devname) ++{ ++ return 0; ++} Index: files/patch-configure =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-configure,v retrieving revision 1.3 diff -u -p -r1.3 patch-configure --- files/patch-configure 3 Jun 2008 18:39:51 -0000 1.3 +++ files/patch-configure 24 Sep 2008 20:32:29 -0000 @@ -8,3 +8,12 @@ Index: qemu/configure [ -x "`which pod2man 2>/dev/null`" ]; then build_docs="yes" fi +@@ -1238,7 +1238,7 @@ + if test "$target_softmmu" = "no" -o "$static" = "yes"; then + echo "SDL_LIBS=$sdl_static_libs" >> $config_mak + else +- echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak ++ echo "SDL_LIBS=`$sdl_config --libs |sed 's|-pthread||'`" >> $config_mak + fi + if [ "${aa}" = "yes" ] ; then + echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_mak Index: files/patch-fbsd =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-fbsd,v retrieving revision 1.12 diff -u -p -r1.12 patch-fbsd --- files/patch-fbsd 8 Jul 2008 18:42:09 -0000 1.12 +++ files/patch-fbsd 24 Sep 2008 20:26:58 -0000 @@ -20,14 +20,14 @@ Index: qemu/Makefile rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~ $(MAKE) -C tests clean Index: qemu/Makefile.target -@@ -651,8 +651,8 @@ +@@ -663,8 +663,8 @@ main.o: CFLAGS+=-p endif -$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a -- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) +- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) +$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a ../bsd/libmath.a -+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) ../bsd/libmath.a ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(OS_LDFLAGS) ../bsd/libmath.a endif # !CONFIG_USER_ONLY @@ -90,17 +90,16 @@ Index: qemu/fpu/softfloat-native.h #define fabsf(f) ((float)fabs(f)) #else #include -@@ -60,7 +80,9 @@ - /*---------------------------------------------------------------------------- +@@ -109,6 +109,8 @@ | Software IEC/IEEE floating-point rounding mode. *----------------------------------------------------------------------------*/ -#if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS) +#if (defined(_BSD) && !defined(__APPLE__) && \ -+ (!defined(__FreeBSD__) || __FreeBSD_version < 500000)) || \ -+ defined(HOST_SOLARIS) - enum { - float_round_nearest_even = FP_RN, - float_round_down = FP_RM, ++ (!defined(__FreeBSD__) || __FreeBSD_version < 500000)) || \ ++ defined(HOST_SOLARIS) + #if defined(__OpenBSD__) + #define FE_RM FP_RM + #define FE_RP FP_RP Index: qemu/fpu/softfloat.h @@ -84,7 +84,8 @@ #define FLOAT128 Index: files/patch-hw-vmware_vga.c =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-hw-vmware_vga.c,v retrieving revision 1.1 diff -u -p -r1.1 patch-hw-vmware_vga.c --- files/patch-hw-vmware_vga.c 2 May 2007 19:55:07 -0000 1.1 +++ files/patch-hw-vmware_vga.c 24 Sep 2008 20:14:30 -0000 @@ -10,3 +10,63 @@ Index: qemu/hw/vmware_vga.c #define HW_MOUSE_ACCEL #ifdef EMBED_STDVGA +@@ -76,6 +76,7 @@ + uint32_t wblue; + int syncing; + int fb_size; ++ int empty; + + union { + uint32_t *fifo; +@@ -487,7 +488,7 @@ + + static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s) + { +- if (!s->config || !s->enable) ++ if (!s->config || !s->enable || s->empty) + return 1; + return (s->cmd->next_cmd == s->cmd->stop); + } +@@ -495,6 +496,10 @@ + static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s) + { + uint32_t cmd = s->fifo[CMD(stop) >> 2]; ++ if (s->cmd->next_cmd == s->cmd->stop) { ++ s->empty = 1; ++ return 0; ++ } + s->cmd->stop = cpu_to_le32(CMD(stop) + 4); + if (CMD(stop) >= CMD(max)) + s->cmd->stop = s->cmd->min; +@@ -512,6 +517,7 @@ + int args = 0; + int x, y, dx, dy, width, height; + struct vmsvga_cursor_definition_s cursor; ++ s->empty = 0; + while (!vmsvga_fifo_empty(s)) + switch (cmd = vmsvga_fifo_read(s)) { + case SVGA_CMD_UPDATE: +@@ -533,6 +539,7 @@ + vmsvga_fill_rect(s, colour, x, y, width, height); + break; + #else ++ args = 0; + goto badcmd; + #endif + +@@ -547,6 +554,7 @@ + vmsvga_copy_rect(s, x, y, dx, dy, width, height); + break; + #else ++ args = 0; + goto badcmd; + #endif + +@@ -609,6 +617,7 @@ + break; /* Nop */ + + default: ++ args = 0; + badcmd: + while (args --) + vmsvga_fifo_read(s); Index: files/patch-osdep.c =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-osdep.c,v retrieving revision 1.4 diff -u -p -r1.4 patch-osdep.c --- files/patch-osdep.c 8 Jul 2008 18:42:09 -0000 1.4 +++ files/patch-osdep.c 24 Sep 2008 20:14:30 -0000 @@ -1,23 +1,24 @@ Index: qemu/osdep.c -@@ -68,7 +68,9 @@ - - #if defined(USE_KQEMU) - +@@ -73,8 +73,10 @@ + #include + #include + #else +#ifndef __FreeBSD__ #include + #endif +#endif + #include #include - -@@ -79,6 +81,7 @@ - const char *tmpdir; - char phys_ram_file[1024]; +@@ -85,6 +87,7 @@ + static int phys_ram_size = 0; void *ptr; + +#ifndef __FreeBSD__ - #ifdef HOST_SOLARIS - struct statvfs stfs; + #ifdef __OpenBSD__ /* no need (?) for a dummy file on OpenBSD */ + int map_anon = MAP_ANON; #else -@@ -138,7 +141,9 @@ +@@ -150,7 +153,9 @@ } unlink(phys_ram_file); } @@ -25,9 +26,9 @@ Index: qemu/osdep.c size = (size + 4095) & ~4095; +#ifndef __FreeBSD__ ftruncate(phys_ram_fd, phys_ram_size + size); + #endif /* !__OpenBSD__ */ ptr = mmap(NULL, - size, -@@ -148,6 +153,13 @@ +@@ -161,6 +166,13 @@ fprintf(stderr, "Could not map physical memory\n"); exit(1); } Index: files/patch-target-i386-translate.c =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-target-i386-translate.c,v retrieving revision 1.3 diff -u -p -r1.3 patch-target-i386-translate.c --- files/patch-target-i386-translate.c 8 Jul 2008 18:42:09 -0000 1.3 +++ files/patch-target-i386-translate.c 24 Sep 2008 20:14:30 -0000 @@ -1,16 +0,0 @@ -Index: qemu/target-i386/translate.c -@@ -3330,8 +3330,12 @@ - op1_offset = offsetof(CPUX86State,xmm_regs[reg]); - tcg_gen_addi_ptr(cpu_ptr0, cpu_env, op1_offset); - sse_op2 = sse_op_table3[(s->dflag == 2) * 2 + ((b >> 8) - 2)]; -- tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]); -- tcg_gen_helper_0_2(sse_op2, cpu_ptr0, cpu_tmp2_i32); -+ if (ot == OT_LONG) { -+ tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]); -+ tcg_gen_helper_0_2(sse_op2, cpu_ptr0, cpu_tmp2_i32); -+ } else { -+ tcg_gen_helper_0_2(sse_op2, cpu_ptr0, cpu_T[0]); -+ } - break; - case 0x02c: /* cvttps2pi */ - case 0x12c: /* cvttpd2pi */ Index: files/patch-tcg-i386-tcg-target.c =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-tcg-i386-tcg-target.c,v retrieving revision 1.1 diff -u -p -r1.1 patch-tcg-i386-tcg-target.c --- files/patch-tcg-i386-tcg-target.c 8 Jul 2008 18:42:09 -0000 1.1 +++ files/patch-tcg-i386-tcg-target.c 24 Sep 2008 20:14:30 -0000 @@ -1,28 +0,0 @@ -Index: qemu/tcg/i386/tcg-target.c -@@ -360,22 +360,22 @@ - case TCG_COND_LT: - tcg_out_brcond(s, TCG_COND_LT, args[1], args[3], const_args[3], args[5]); - tcg_out_jxx(s, JCC_JNE, label_next); -- tcg_out_brcond(s, TCG_COND_LT, args[0], args[2], const_args[2], args[5]); -+ tcg_out_brcond(s, TCG_COND_LTU, args[0], args[2], const_args[2], args[5]); - break; - case TCG_COND_LE: - tcg_out_brcond(s, TCG_COND_LT, args[1], args[3], const_args[3], args[5]); - tcg_out_jxx(s, JCC_JNE, label_next); -- tcg_out_brcond(s, TCG_COND_LE, args[0], args[2], const_args[2], args[5]); -+ tcg_out_brcond(s, TCG_COND_LEU, args[0], args[2], const_args[2], args[5]); - break; - case TCG_COND_GT: - tcg_out_brcond(s, TCG_COND_GT, args[1], args[3], const_args[3], args[5]); - tcg_out_jxx(s, JCC_JNE, label_next); -- tcg_out_brcond(s, TCG_COND_GT, args[0], args[2], const_args[2], args[5]); -+ tcg_out_brcond(s, TCG_COND_GTU, args[0], args[2], const_args[2], args[5]); - break; - case TCG_COND_GE: - tcg_out_brcond(s, TCG_COND_GT, args[1], args[3], const_args[3], args[5]); - tcg_out_jxx(s, JCC_JNE, label_next); -- tcg_out_brcond(s, TCG_COND_GE, args[0], args[2], const_args[2], args[5]); -+ tcg_out_brcond(s, TCG_COND_GEU, args[0], args[2], const_args[2], args[5]); - break; - case TCG_COND_LTU: - tcg_out_brcond(s, TCG_COND_LTU, args[1], args[3], const_args[3], args[5]); Index: files/patch-vl.c =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-vl.c,v retrieving revision 1.11 diff -u -p -r1.11 patch-vl.c --- files/patch-vl.c 8 Jul 2008 18:42:09 -0000 1.11 +++ files/patch-vl.c 24 Sep 2008 20:14:30 -0000 @@ -1,34 +1,8 @@ Index: qemu/vl.c -@@ -1727,6 +1728,7 @@ - chr->chr_ioctl = pp_ioctl; - return chr; - } -+#endif /* defined(__linux__) */ - - #else - CharDriverState *qemu_chr_open_pty(void) -@@ -2334,7 +2334,7 @@ - } - #endif - --#if defined(__linux__) || defined(__sun__) -+#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) - static CharDriverState *qemu_chr_open_pty(void) - { - struct termios tty; -@@ -3036,7 +3036,7 @@ - return qemu_chr_open_pp(filename); - } else - #endif --#if defined(__linux__) || defined(__sun__) -+#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) - if (strstart(filename, "/dev/", NULL)) { - return qemu_chr_open_tty(filename); - } else -@@ -8423,6 +8423,11 @@ - nb_nics = 0; - /* default mac address of the first network interface */ +@@ -8409,6 +8409,11 @@ + tb_size = 0; + +#ifdef __FreeBSD__ + if (modfind("aio") == -1) + fprintf(stderr, "warning: aio not (kld)loaded, may cause `Invalid system call' traps on disk IO\n"); Index: files/patch-vl.c-ppbus =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-vl.c-ppbus,v retrieving revision 1.5 diff -u -p -r1.5 patch-vl.c-ppbus --- files/patch-vl.c-ppbus 9 Aug 2007 20:03:30 -0000 1.5 +++ files/patch-vl.c-ppbus 24 Sep 2008 20:14:30 -0000 @@ -1,7 +1,5 @@ Index: qemu/vl.c -@@ -78,8 +78,10 @@ - #endif - #ifdef __FreeBSD__ +@@ -108,6 +108,8 @@ #include #include #include @@ -10,11 +8,10 @@ Index: qemu/vl.c #endif #if defined(CONFIG_SLIRP) -@@ -1728,7 +1730,64 @@ - chr->chr_ioctl = pp_ioctl; - return chr; +@@ -2939,6 +2941,65 @@ } --#endif /* defined(__linux__) */ + #endif /* __linux__ */ + +#if defined(__FreeBSD__) +static int pp_ioctl(CharDriverState *chr, int cmd, void *arg) +{ @@ -73,20 +70,21 @@ Index: qemu/vl.c + return chr; +} +#endif ++ + #else /* _WIN32 */ - #else - CharDriverState *qemu_chr_open_pty(void) -@@ -2562,6 +2622,13 @@ - #endif + typedef struct { +@@ -3824,6 +3885,13 @@ #if defined(__linux__) if (strstart(filename, "/dev/parport", NULL)) { -+ return qemu_chr_open_pp(filename); + return qemu_chr_open_pp(filename); + } else + if (strstart(filename, "/dev/", NULL)) { + return qemu_chr_open_tty(filename); + } else +#elif defined(__FreeBSD__) + if (strstart(filename, "/dev/ppi", NULL)) { - return qemu_chr_open_pp(filename); - } else - if (strstart(filename, "/dev/", NULL)) { ++ return qemu_chr_open_pp(filename); + } else + #endif + #if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) Index: files/patch-block-raw-posix.c @@ -0,0 +1,19 @@ +Index: qemu/block-raw-posix.c +@@ -545,7 +545,8 @@ + + qemu_aio_set_fd_handler(s->fd, posix_aio_read, NULL, posix_aio_flush, s); + +-#if defined(__linux__) && defined(__GLIBC_PREREQ) && !__GLIBC_PREREQ(2, 4) ++#if defined(__linux__) && defined(__GLIBC_PREREQ) ++#if !__GLIBC_PREREQ(2, 4) + { + /* XXX: aio thread exit seems to hang on RedHat 9 and this init + seems to fix the problem. */ +@@ -557,6 +558,7 @@ + aio_init(&ai); + } + #endif ++#endif + posix_aio_state = s; + + return 0;