WEDNESDAY, JULY 1, 2026
build
Fix pthread detection on Solaris 11.4 in ax_pthread.m4
Corrected autoconf macro to properly detect pthread support on modern Solaris systems.
This commit fixes an issue where autoconf’s AX_PTHREAD macro incorrectly reported a lack of pthread support on Solaris 11.4, preventing libraries like libcaf_shmem from being built. The fix adjusts the macro to only require the pre-XPG7 system header behavior for older Solaris versions, as newer versions no longer define _REENTRANT in the same way.
In Details
The AX_PTHREAD autoconf macro was updated to correctly handle Solaris 11.4 and later by conditionally checking for the presence of _REENTRANT. This addresses a regression where the macro incorrectly assumed its absence due to changes in system header definitions, impacting multi-threaded application builds.
For Context
- _REENTRANT
- A preprocessor macro historically used to indicate that a program is intended to be reentrant, meaning it can be safely interrupted and re-entered before it completes. Modern systems often handle reentrancy differently.
- autoconf
- A tool that automatically configures source code package builds for various Unix-like systems. It generates shell scripts to adapt software to local environment conditions.
- AX_PTHREAD
- An autoconf macro from the autoconf-archive that checks for POSIX Threads (pthreads) support on a system.