From 680120bb20f04fd275657e520c4cb2c525abed27 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 21 Jan 2020 18:10:46 +0900 Subject: virt: do not define vm_from_string() for non-x86 architecture Fixes #14615. --- src/basic/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/basic/virt.c b/src/basic/virt.c index 12bf77e701..07831634da 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -20,6 +20,7 @@ #include "string-util.h" #include "virt.h" +#if defined(__i386__) || defined(__x86_64__) static const char *const vm_table[_VIRTUALIZATION_MAX] = { [VIRTUALIZATION_XEN] = "XenVMMXenVMM", [VIRTUALIZATION_KVM] = "KVMKVMKVM", @@ -36,6 +37,7 @@ static const char *const vm_table[_VIRTUALIZATION_MAX] = { }; DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(vm, int); +#endif static int detect_vm_cpuid(void) { -- cgit v1.2.3