diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-01-21 10:10:46 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-01-21 13:47:08 +0100 |
commit | 680120bb20f04fd275657e520c4cb2c525abed27 (patch) | |
tree | 60770115e76b4b8efe17f0c4ca857169c571d91d /src/basic/virt.c | |
parent | json: lower maximum allowed recursion to 2K (diff) | |
download | systemd-680120bb20f04fd275657e520c4cb2c525abed27.tar.xz systemd-680120bb20f04fd275657e520c4cb2c525abed27.zip |
virt: do not define vm_from_string() for non-x86 architecture
Fixes #14615.
Diffstat (limited to '')
-rw-r--r-- | src/basic/virt.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |