diff mbox series

[5/9] x86: fixes types for NetBSD & OpenBSD

Message ID 20200708234151.57845-6-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show
Series OS-specific small fixes & cleanup | expand

Commit Message

Luc Van Oostenryck July 8, 2020, 11:41 p.m. UTC
On NetBSD & OpenBSD, some types are not defined like on Linux.

Fix this.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 target-x86.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/target-x86.c b/target-x86.c
index 01117bb6ecc8..62323aecc52b 100644
--- a/target-x86.c
+++ b/target-x86.c
@@ -29,6 +29,8 @@  static void init_x86_common(const struct target *target)
 		wint_ctype = &int_ctype;
 		break;
 	case OS_OPENBSD:
+		size_t_ctype = &ulong_ctype;
+		ssize_t_ctype = &long_ctype;
 		wchar_ctype = &int_ctype;
 		wint_ctype = &int_ctype;
 		break;
@@ -72,6 +74,15 @@  static void init_x86_64(const struct target *target)
 		break;
 	case OS_FREEBSD:
 		break;
+	case OS_NETBSD:
+		wint_ctype = &int_ctype;
+		break;
+	case OS_OPENBSD:
+		int64_ctype = &llong_ctype;
+		uint64_ctype = &ullong_ctype;
+		intmax_ctype = &llong_ctype;
+		uintmax_ctype = &ullong_ctype;
+		break;
 	}
 }