mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
nodeinfo: fix build on FreeBSD
Currently, build fails on FreeBSD with: CC libvirt_driver_la-nodeinfo.lo nodeinfo.c:1941:56: error: use of undeclared identifier 'SYSFS_SYSTEM_PATH' const char *prefix = sysfs_prefix ? sysfs_prefix : SYSFS_SYSTEM_PATH; ^ 1 error generated. This is caused by commit b97b3048 that added sysfs_prefix to nodeCapsInitNUMA and used SYSFS_CPU_PATH. Fix it by unconditionally defining SYSFS_CPU_PATH instead of defining it under #ifdef __linux__.
This commit is contained in:
parent
717c99f360
commit
e46791e003
@ -59,6 +59,8 @@
|
||||
|
||||
VIR_LOG_INIT("nodeinfo");
|
||||
|
||||
#define SYSFS_SYSTEM_PATH "/sys/devices/system"
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__APPLE__)
|
||||
static int
|
||||
appleFreebsdNodeGetCPUCount(void)
|
||||
@ -283,7 +285,6 @@ freebsdNodeGetMemoryStats(virNodeMemoryStatsPtr params,
|
||||
|
||||
#ifdef __linux__
|
||||
# define CPUINFO_PATH "/proc/cpuinfo"
|
||||
# define SYSFS_SYSTEM_PATH "/sys/devices/system"
|
||||
# define PROCSTAT_PATH "/proc/stat"
|
||||
# define MEMINFO_PATH "/proc/meminfo"
|
||||
# define SYSFS_MEMORY_SHARED_PATH "/sys/kernel/mm/ksm"
|
||||
|
Loading…
x
Reference in New Issue
Block a user