test/amd64: update to qemu-0.10.6
[dragonfly.git] / test / amd64 / qemu.patch
blob7486c453621820bcb99ef5b3a9a1b9cc2b00d6c8
1 diff --git a/block.c b/block.c
2 index b68a8da..6ed24ad 100644
3 --- a/block.c
4 +++ b/block.c
5 @@ -35,8 +35,10 @@
6 #include <sys/types.h>
7 #include <sys/stat.h>
8 #include <sys/ioctl.h>
9 +#ifndef __DragonFly__
10 #include <sys/disk.h>
11 #endif
12 +#endif
14 #define SECTOR_BITS 9
15 #define SECTOR_SIZE (1 << SECTOR_BITS)
16 diff --git a/configure b/configure
17 index 6164241..3e206b2 100755
18 --- a/configure
19 +++ b/configure
20 @@ -228,6 +228,11 @@ if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
21 kqemu="yes"
24 +DragonFly)
25 +bsd="yes"
26 +oss="yes"
27 +dragonfly="yes"
28 +;;
29 NetBSD)
30 bsd="yes"
31 audio_drv_list="oss"
32 @@ -1317,6 +1322,10 @@ if test "$darwin" = "yes" ; then
33 echo "CONFIG_DARWIN=yes" >> $config_mak
34 echo "#define CONFIG_DARWIN 1" >> $config_h
36 +if test "$dragonfly" = "yes" ; then
37 + echo "CONFIG_DRAGONFLY=yes" >> $config_mak
38 + echo "#define CONFIG_DRAGONFLY 1" >> $config_h
39 +fi
41 if test "$aix" = "yes" ; then
42 echo "CONFIG_AIX=yes" >> $config_mak
43 diff --git a/cpu-exec.c b/cpu-exec.c
44 index 7607e24..deb845d 100644
45 --- a/cpu-exec.c
46 +++ b/cpu-exec.c
47 @@ -1156,6 +1156,12 @@ static inline int handle_cpu_signal(unsigned long pc, unsigned long address,
48 # define EIP_sig(context) (*((unsigned long*)&(context)->uc_mcontext->ss.eip))
49 # define TRAP_sig(context) ((context)->uc_mcontext->es.trapno)
50 # define ERROR_sig(context) ((context)->uc_mcontext->es.err)
51 +#elif defined (__DragonFly__)
52 +# include <ucontext.h>
54 +# define EIP_sig(context) (*((unsigned long*)&(context)->uc_mcontext.mc_eip))
55 +# define TRAP_sig(context) ((context)->uc_mcontext.mc_trapno)
56 +# define ERROR_sig(context) ((context)->uc_mcontext.mc_err)
57 #else
58 # define EIP_sig(context) ((context)->uc_mcontext.gregs[REG_EIP])
59 # define TRAP_sig(context) ((context)->uc_mcontext.gregs[REG_TRAPNO])
60 @@ -1166,7 +1172,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
61 void *puc)
63 siginfo_t *info = pinfo;
64 - struct ucontext *uc = puc;
65 + ucontext_t *uc = puc;
66 unsigned long pc;
67 int trapno;
69 diff --git a/texi2pod.pl b/texi2pod.pl
70 index 5d28a05..abca509 100755
71 --- a/texi2pod.pl
72 +++ b/texi2pod.pl
73 @@ -1,4 +1,4 @@
74 -#! /usr/bin/perl -w
75 +#! /usr/bin/env perl -w
77 # Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
79 diff --git a/usb-bsd.c b/usb-bsd.c
80 index fa4093c..60e78d4 100644
81 --- a/usb-bsd.c
82 +++ b/usb-bsd.c
83 @@ -34,7 +34,11 @@
84 #undef USB_SPEED_LOW
86 #include <sys/ioctl.h>
87 +#ifdef __DragonFly__
88 +#include <bus/usb/usb.h>
89 +#else
90 #include <dev/usb/usb.h>
91 +#endif
92 #include <signal.h>
94 /* This value has maximum potential at 16.