[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/17] Disable host_kernel_version() everywhere but on i386
From: |
Sergey Bugaev |
Subject: |
[PATCH 02/17] Disable host_kernel_version() everywhere but on i386 |
Date: |
Wed, 27 Mar 2024 19:18:26 +0300 |
It's not only x86_64, none of new architectures are going to have it.
---
include/mach/mach_host.defs | 6 +++---
kern/host.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/mach/mach_host.defs b/include/mach/mach_host.defs
index a8c40af6..8fd9d6b3 100644
--- a/include/mach/mach_host.defs
+++ b/include/mach/mach_host.defs
@@ -161,9 +161,7 @@ routine task_get_assignment(
task : task_t;
out assigned_set : processor_set_name_t);
-#if defined(__x86_64__) && !defined(USER32)
-skip;
-#else
+#if defined(__i386__) || (defined(__x86_64__) && defined(USER32))
/*
* Get string describing current kernel version.
* Deprecated, use host_get_kernel_version.
@@ -171,6 +169,8 @@ skip;
routine host_kernel_version(
host : host_t;
out kernel_version : kernel_version_t);
+#else
+skip;
#endif
/*
diff --git a/kern/host.c b/kern/host.c
index 69394374..53f8bdbd 100644
--- a/kern/host.c
+++ b/kern/host.c
@@ -219,8 +219,8 @@ kern_return_t host_get_kernel_version(
return KERN_SUCCESS;
}
-#if !defined(__x86_64__) || defined(USER32)
-/* Same as above, but does not exist for x86_64. */
+#if defined(__i386__) || (defined(__x86_64__) && defined(USER32))
+/* Same as above, but only exists on i386. */
kern_return_t host_kernel_version(
const host_t host,
kernel_version_t out_version)
--
2.44.0
- [PATCH 05/17] gsync: Use copyin()/copyout() to access user memory, (continued)
- [PATCH 05/17] gsync: Use copyin()/copyout() to access user memory, Sergey Bugaev, 2024/03/27
- [PATCH 01/17] elf-load: Respect PT_GNU_STACK, Sergey Bugaev, 2024/03/27
- [PATCH 04/17] Load 64-bit ELFs on all 64-bit ports, Sergey Bugaev, 2024/03/27
- [PATCH 06/17] kern/syscall_subr.c: Use copyin()/copyout() to access user memory, Sergey Bugaev, 2024/03/27
- [PATCH 03/17] Use the x86_64 message ABI on all 64-bit ports, Sergey Bugaev, 2024/03/27
- [PATCH 02/17] Disable host_kernel_version() everywhere but on i386,
Sergey Bugaev <=
- [PATCH 08/17] ipc: Turn ipc_entry_lookup_failed() into a macro, Sergey Bugaev, 2024/03/27
- [PATCH 11/17] tests: Fix halt(), Sergey Bugaev, 2024/03/27
- [PATCH 09/17] Move copy{in,out}msg declarations to copy_user.h, Sergey Bugaev, 2024/03/27
- [PATCH 15/17] tests: Make exception subcode a long, Sergey Bugaev, 2024/03/27
- [PATCH 12/17] tests: Add a more serious mach_msg_server() routine, Sergey Bugaev, 2024/03/27