Skip to content

Commit 50a2c5f

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 5249f4f commit 50a2c5f

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
@@ -1221,10 +1221,13 @@ IF(HAVE_NUMAIF_H AND WITH_NUMA)
12211221
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} numa)
12221222
CHECK_C_SOURCE_COMPILES(
12231223
"
1224+
#include <numa.h>
12241225
#include <numaif.h>
12251226
int main()
12261227
{
1228+
struct bitmask *all_nodes= numa_all_nodes_ptr;
12271229
set_mempolicy(MPOL_DEFAULT, 0, 0);
1230+
return all_nodes != NULL;
12281231
}"
12291232
HAVE_LIBNUMA)
12301233
SET(CMAKE_REQUIRED_LIBRARIES ${SAVE_CMAKE_REQUIRED_LIBRARIES})

0 commit comments

Comments
 (0)