On 5/15/26 9:37 AM, Rainer Orth wrote:
libcaf_shmem doesn't currently build on Solaris. Previously this went unnoticed because the AX_PTHREADS autoconf macro erroneously didn't detect pthreads support. Once this is fixed, compilation fails:In file included from caf/shmem/supervisor.h:35, from caf/shmem/alloc.c:31: caf/shmem/sync.h:46:25: error: conflicting types for ‘lock_t’; have ‘caf_shmem_mutex’ {aka ‘struct _pthread_mutex’} 46 | typedef caf_shmem_mutex lock_t; | ^~~~~~ In file included from /usr/include/sys/machtypes.h:12, from /usr/include/sys/types.h:17, from caf/shmem/thread_support.h:33, from caf/shmem/shared_memory.h:28, from caf/shmem/allocator.h:31, from caf/shmem/alloc.h:28, from caf/shmem/alloc.c:29: /usr/include/ia32/sys/machtypes.h:50:25: note: previous declaration of ‘lock_t’ with type ‘lock_t’ {aka ‘unsigned int’} The lock_t definition in <ia32/sys/machtypes.h> is benign: POSIX.1 reserves the _t suffix for the implementation. At the very least the code should use a properly prefixed type instead, which this patch does by changing the code to use caf_shmem_lock_t instead. Bootstrapped without regressions on i386-pc-solaris2.11, sparc-sun-solaris2.11, and x86_64-pc-linux-gnu. Ok for trunk? Rainer
This applies and tests OK for me on x86_64. OK for trunk. Thanks Jerry
