From: Yu Watanabe Date: Tue, 21 Jan 2020 09:10:46 +0000 (+0900) Subject: virt: do not define vm_from_string() for non-x86 architecture X-Git-Tag: v245-rc1~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=680120bb20f04fd275657e520c4cb2c525abed27;p=thirdparty%2Fsystemd.git virt: do not define vm_from_string() for non-x86 architecture Fixes #14615. --- diff --git a/src/basic/virt.c b/src/basic/virt.c index 12bf77e7013..07831634da7 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) {