nodeinfo: fix build on non-Linux
Commit b0f85462 broke the build on mingw, by exposing code that had Linux-specific dependencies but which was previously protected by libnuma ifdef guards: make[3]: Entering directory `/home/eblake/libvirt-tmp/build/src' CC libvirt_driver_la-nodeinfo.lo ../../src/nodeinfo.c: In function 'virNodeGetSiblingsList': ../../src/nodeinfo.c:1543:30: error: 'SYSFS_THREAD_SIBLINGS_LIST_LENGTH_MAX' undeclared (first use in this function) if (virFileReadAll(path, SYSFS_THREAD_SIBLINGS_LIST_LENGTH_MAX, &buf) < 0) ^ ../../src/nodeinfo.c:1543:30: note: each undeclared identifier is reported only once for each function it appears in ../../src/nodeinfo.c: In function 'virNodeCapsFillCPUInfo': ../../src/nodeinfo.c:1562:5: error: implicit declaration of function 'virNodeGetCpuValue' [-Werror=implicit-function-declaration] if ((tmp = virNodeGetCpuValue(SYSFS_CPU_PATH, cpu_id, ^ ../../src/nodeinfo.c:1562:5: error: nested extern declaration of 'virNodeGetCpuValue' [-Werror=nested-externs] ../../src/nodeinfo.c:1562:35: error: 'SYSFS_CPU_PATH' undeclared (first use in this function) if ((tmp = virNodeGetCpuValue(SYSFS_CPU_PATH, cpu_id, ^ cc1: all warnings being treated as errors * src/nodeinfo.c (virNodeCapsFillCPUInfo): Make conditional. (virNodeGetSiblingsList): Move into #ifdef linux block. Signed-off-by: NEric Blake <eblake@redhat.com>
Showing
想要评论请 注册 或 登录