From: Daniel P. Berrangé Date: Tue, 30 Nov 2021 10:51:33 +0000 (+0000) Subject: util: canonicalize 'arm64' arch to 'aarch64' X-Git-Tag: v7.10.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b719d82f4a38b3b17efda6ac27c23c3556e27850;p=thirdparty%2Flibvirt.git util: canonicalize 'arm64' arch to 'aarch64' macOS on Apple silicon reports 'arm64' as the architecture from uname, which we need to canonicalize to VIR_ARCH_AARCH64 / 'aarch64'. Signed-off-by: Daniel P. Berrangé --- diff --git a/src/util/virarch.c b/src/util/virarch.c index f088b6b676..2134dd6a9d 100644 --- a/src/util/virarch.c +++ b/src/util/virarch.c @@ -220,6 +220,8 @@ virArch virArchFromHost(void) arch = VIR_ARCH_I686; } else if (STREQ(ut.machine, "amd64")) { arch = VIR_ARCH_X86_64; + } else if (STREQ(ut.machine, "arm64")) { + arch = VIR_ARCH_AARCH64; } else { /* Otherwise assume the canonical name */ if ((arch = virArchFromString(ut.machine)) == VIR_ARCH_NONE) {