Project

General

Profile

Feature #2346 ยป 0079-Meson-Add-pthreads-check.patch

Marko Lindqvist, 10/10/2026 08:15 AM

View differences:

meson.build
name: 'C11 threads')
pub_conf_data.set('FREECIV_HAVE_C11_THREADS', 1)
threads='c11'
elif host_system != 'windows' and c_compiler.compiles('''
#include <pthread.h>
void *(*srout)(void *);
int main(void) { void *arg; return pthread_create(NULL, NULL, srout, arg); }''',
name: 'pthreads')
pub_conf_data.set('FREECIV_HAVE_PTHREAD', 1)
threads='pthread'
else
threads=''
endif
......
priv_conf_data.set('HAVE_WORKING_VSNPRINTF', 1)
if threads == ''
pub_conf_data.set('FREECIV_HAVE_PTHREAD', 1)
threads='pthread'
error('No suitable thread implementation found')
endif
if host_system == 'haiku'
    (1-1/1)