]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
CMake: Fix a wrong #define
authorLasse Collin <lasse.collin@tukaani.org>
Tue, 24 Feb 2026 16:22:25 +0000 (18:22 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Wed, 25 Feb 2026 15:32:13 +0000 (17:32 +0200)
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.")
cmake/tuklib_cpucores.cmake
cmake/tuklib_physmem.cmake

index 05f3ceef8d15ebed3e9f365bcd67fb7a2386ee1c..19ae7aa2145b48120d3c75eb6ef5196ab2acdfa7 100644 (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
index d4d3f3d260c38ea23d5c20cb2ec6d484cf5faaf1..2e6ee635db3ecf3f4736b0df077ff776d7f92812 100644 (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