From: Martin Kletzander Date: Tue, 9 May 2017 12:17:38 +0000 (+0200) Subject: util: Define SYSFS_SYSTEM_PATH unconditionally in virhostcpu X-Git-Tag: v3.4.0-rc1~139 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=40824174258a835c5725af1c01317844d31d9420;p=thirdparty%2Flibvirt.git util: Define SYSFS_SYSTEM_PATH unconditionally in virhostcpu The code is already prepared to handle the non-existence of it. Signed-off-by: Martin Kletzander --- diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index 317c52410a..aa9cfeac20 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -188,10 +188,15 @@ virHostCPUGetStatsFreeBSD(int cpuNum, #endif /* __FreeBSD__ */ +/* + * Even though it doesn't exist on some platforms, the code is adjusted for + * graceful handling of that so that we don't have too many stub functions. + */ +#define SYSFS_SYSTEM_PATH "/sys/devices/system" + #ifdef __linux__ # define CPUINFO_PATH "/proc/cpuinfo" # define PROCSTAT_PATH "/proc/stat" -# define SYSFS_SYSTEM_PATH "/sys/devices/system" # define VIR_HOST_CPU_MASK_LEN 1024 # define LINUX_NB_CPU_STATS 4