--- qemu-1.4.0/bsd-user/syscall.c.orig +++ qemu-1.4.0/bsd-user/syscall.c @@ -62,7 +62,11 @@ #include #include #include +#if defined(__FreeBSD_version) && __FreeBSD_version > 900000 #include +#else +#include +#endif #include #include #include @@ -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;