From e652799da09e4bade166476ad4cee13e49722ec9 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Sat, 23 Mar 2024 14:53:21 +0300 Subject: proc: Add support for AArch64 in uname Since no CPU subtypes are defined for CPU_TYPE_ARM64, just report the type, same as for x86_64. Sample uname(2) output: sysname: GNU release: 0.9 version: GNU-Mach 1.8/Hurd-0.9 machine: aarch64 Message-ID: <20240323115322.69075-9-bugaevc@gmail.com> --- proc/host.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'proc/host.c') diff --git a/proc/host.c b/proc/host.c index 0197fecf..e0aff20a 100644 --- a/proc/host.c +++ b/proc/host.c @@ -355,11 +355,11 @@ initialize_version_info (void) assert_backtrace (! err); snprintf (uname_info.machine, sizeof uname_info.machine, "%s" -#ifndef __x86_64__ +#if !defined (__x86_64__) && !defined (__aarch64__) "-%s" #endif , mach_cpu_types[info.cpu_type] -#ifndef __x86_64__ +#if !defined (__x86_64__) && !defined (__aarch64__) , mach_cpu_subtypes[info.cpu_type][info.cpu_subtype] #endif ); -- cgit v1.2.3