Skip to content

Commit 0c6a5d0

Browse files
author
Tor Didriksen
committed
Bug#21785074 BUILD BREAKS IF COMPILED AGAINST OLDER NUMACTL HEADERS
Fix: extend the cmake check with new numa features, do not set HAVE_LIBNUMA if built against older numa headers.
1 parent 5332cd4 commit 0c6a5d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

configure.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,10 +1146,13 @@ IF(HAVE_NUMAIF_H AND WITH_NUMA)
11461146
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} numa)
11471147
CHECK_C_SOURCE_COMPILES(
11481148
"
1149+
#include <numa.h>
11491150
#include <numaif.h>
11501151
int main()
11511152
{
1153+
struct bitmask *all_nodes= numa_all_nodes_ptr;
11521154
set_mempolicy(MPOL_DEFAULT, 0, 0);
1155+
return all_nodes != NULL;
11531156
}"
11541157
HAVE_LIBNUMA)
11551158
SET(CMAKE_REQUIRED_LIBRARIES ${SAVE_CMAKE_REQUIRED_LIBRARIES})

0 commit comments

Comments
 (0)