1
0
mirror of https://git.tukaani.org/xz.git synced 2026-02-25 21:38:06 +00:00

CMake: Fix a wrong #define

HAVE_SYS_PARAM_H was misspelled HAVE_PARAM_H. This might have broken
the build on systems where sysctl() is used to detect the amount of RAM
or the number of processor cores/threads.

The cpuset code for FreeBSD doesn't need the macro it so it was removed.

Fixes: https://github.com/dotnet/runtime/pull/124003#discussion_r2782313680
Fixes: https://github.com/dotnet/runtime/pull/124003#discussion_r2782313704
Fixes: 7e3493d40eac ("Build: Add very limited experimental CMake support.")
This commit is contained in:
Lasse Collin 2026-02-24 18:22:25 +02:00
parent b0f3b64a25
commit bf5d32f489
No known key found for this signature in database
GPG Key ID: 38EE757D69184620
2 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@ function(tuklib_cpucores_internal_check)
"
TUKLIB_CPUCORES_CPUSET)
if(TUKLIB_CPUCORES_CPUSET)
set(TUKLIB_CPUCORES_DEFINITIONS "HAVE_PARAM_H;TUKLIB_CPUCORES_CPUSET"
set(TUKLIB_CPUCORES_DEFINITIONS "TUKLIB_CPUCORES_CPUSET"
CACHE INTERNAL "")
return()
endif()
@ -109,7 +109,7 @@ function(tuklib_cpucores_internal_check)
if(TUKLIB_CPUCORES_SYSCTL)
if(HAVE_SYS_PARAM_H)
set(TUKLIB_CPUCORES_DEFINITIONS
"HAVE_PARAM_H;TUKLIB_CPUCORES_SYSCTL"
"HAVE_SYS_PARAM_H;TUKLIB_CPUCORES_SYSCTL"
CACHE INTERNAL "")
else()
set(TUKLIB_CPUCORES_DEFINITIONS

View File

@ -101,7 +101,7 @@ function(tuklib_physmem_internal_check)
if(TUKLIB_PHYSMEM_SYSCTL)
if(HAVE_SYS_PARAM_H)
set(TUKLIB_PHYSMEM_DEFINITIONS
"HAVE_PARAM_H;TUKLIB_PHYSMEM_SYSCTL"
"HAVE_SYS_PARAM_H;TUKLIB_PHYSMEM_SYSCTL"
CACHE INTERNAL "")
else()
set(TUKLIB_PHYSMEM_DEFINITIONS