summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorShawn Landden <shawnlandden@gmail.com>2013-07-20 10:15:13 -0700
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-07-20 21:33:10 -0400
commit3c475ce44e6b3b5bd6b22cff11a1322dabd95ba0 (patch)
treed2d898128796f4b4c97836beb02246c89546ae15 /src/shared
parenteb75d0ed059f56f0b5a8dcb8d490fae7063c76ca (diff)
shared: fix build on !x86
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/virt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/virt.c b/src/shared/virt.c
index 1abd6863ea..4f8134a773 100644
--- a/src/shared/virt.c
+++ b/src/shared/virt.c
@@ -29,6 +29,8 @@
/* Returns a short identifier for the various VM implementations */
int detect_vm(const char **id) {
+ _cleanup_free_ char *cpuinfo_contents = NULL;
+ int r;
#if defined(__i386__) || defined(__x86_64__)
@@ -67,8 +69,6 @@ int detect_vm(const char **id) {
const char *j, *k;
bool hypervisor;
_cleanup_free_ char *hvtype = NULL;
- _cleanup_free_ char *cpuinfo_contents = NULL;
- int r;
/* Try high-level hypervisor sysfs file first:
*