error('When using GCC, version 4.4.6 or later is required.')
endif
+# Support systems without ETIME (e.g. FreeBSD)
+if cc.get_define('ETIME', prefix : '#include <errno.h>') == ''
+ pre_args += '-DETIME=ETIMEDOUT'
+endif
+
# Define DEBUG for debug builds only (debugoptimized is not included on this one)
if get_option('buildtype') == 'debug'
pre_args += '-DDEBUG'
args : '-D_GNU_SOURCE')
pre_args += '-DHAVE_PTHREAD_SETAFFINITY'
endif
+ if cc.has_function(
+ 'pthread_setaffinity_np',
+ dependencies : dep_thread,
+ prefix : '#include <pthread_np.h>')
+ pre_args += '-DPTHREAD_SETAFFINITY_IN_NP_HEADER'
+ endif
endif
dep_expat = dependency('expat')
# this only exists on linux so either this is linux and it will be found, or