1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
--- qemu-1.4.0/bsd-user/syscall.c.orig
+++ qemu-1.4.0/bsd-user/syscall.c
@@ -62,7 +62,11 @@
#include <sys/rtprio.h>
#include <sys/umtx.h>
#include <sys/uuid.h>
+#if defined(__FreeBSD_version) && __FreeBSD_version > 900000
#include <sys/_termios.h>
+#else
+#include <sys/termios.h>
+#endif
#include <sys/ttycom.h>
#include <sys/reboot.h>
#include <sys/timex.h>
@@ -6383,6 +6387,7 @@ abi_long do_freebsd_syscall(void *cpu_en
val, NULL, NULL));
break;
+#if defined(__FreeBSD_version) && __FreeBSD_version > 900000
case TARGET_UMTX_OP_NWAKE_PRIVATE:
if (! access_ok(VERIFY_READ, obj,
val * sizeof(uint32_t)))
@@ -6390,7 +6395,7 @@ abi_long do_freebsd_syscall(void *cpu_en
ret = get_errno(_umtx_op(g2h(obj), UMTX_OP_NWAKE_PRIVATE,
val, NULL, NULL));
break;
-
+#endif
case TARGET_UMTX_OP_RW_RDLOCK:
if (target_ts) {
@@ -6425,6 +6430,7 @@ abi_long do_freebsd_syscall(void *cpu_en
break;
#endif
+#if defined(__FreeBSD_version) && __FreeBSD_version > 900000
case TARGET_UMTX_OP_SEM_WAIT:
/* XXX Assumes struct _usem is opauque to the user */
if (! access_ok(VERIFY_WRITE, obj,
@@ -6447,6 +6453,7 @@ abi_long do_freebsd_syscall(void *cpu_en
ret = get_errno(_umtx_op(g2h(obj), UMTX_OP_SEM_WAKE,
val, NULL, NULL));
break;
+#endif
default:
ret = -TARGET_EINVAL;
|