summaryrefslogtreecommitdiff
path: root/emulators/qemu-devel/files/patch-z9-bsd-user-sson003a
blob: 3a8887d6c98a803a33c722a7b2c4ccb124fe4fb6 (plain) (blame)
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
diff --git a/bsd-user/freebsd/ioctl.h b/bsd-user/freebsd/ioctl.h
index 67c5583..f83f6c1 100644
--- a/bsd-user/freebsd/ioctl.h
+++ b/bsd-user/freebsd/ioctl.h
@@ -8,8 +8,8 @@ IOCTL(TIOCSBRK, IOC_, TYPE_NULL)
 IOCTL(TIOCCBRK, IOC_, TYPE_NULL)
 IOCTL(TIOCSDTR, IOC_, TYPE_NULL)
 IOCTL(TIOCCDTR, IOC_, TYPE_NULL)
-IOCTL(TIOCGPGRP, IOC_W, MK_PTR(TYPE_INT))
-IOCTL(TIOCSPGRP, IOC_R, MK_PTR(TYPE_INT))
+IOCTL(TIOCGPGRP, IOC_R, MK_PTR(TYPE_INT))
+IOCTL(TIOCSPGRP, IOC_W, MK_PTR(TYPE_INT))
 IOCTL(TIOCGETA, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
 IOCTL(TIOCSETA, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
 IOCTL(TIOCSETAW, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
diff --git a/bsd-user/main.c b/bsd-user/main.c
index d9a0ecd..7cc77aa 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -1907,7 +1907,7 @@ int main(int argc, char **argv)
 		env->hflags |= MIPS_HFLAG_M16;
 	}
 #if defined(TARGET_MIPS64)
-	env->hflags |= MIPS_HFLAG_UX;
+	env->hflags |= MIPS_HFLAG_UX | MIPS_HFLAG_64;
 #endif
     }
 #else
diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
index 581a31f..a40d7ce 100644
--- a/bsd-user/syscall.c
+++ b/bsd-user/syscall.c
@@ -278,7 +278,6 @@ static abi_long do_freebsd_sysarch(void *env, int op, abi_ulong parms)
 #ifdef TARGET_ARM
 static abi_long do_freebsd_sysarch(void *env, int op, abi_ulong parms)
 {
-   abi_ulong val;
 
     switch (op) {
     case TARGET_FREEBSD_ARM_SET_TP: