瀏覽代碼

meson: check clockid_t availability

Alexandre Janniaux 5 年之前
父節點
當前提交
c790283ab6
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      meson.build

+ 5 - 0
meson.build

@@ -125,6 +125,11 @@ if cc.has_type('struct timespec', prefix: '#include <time.h>')
   conf_data.set('HAVE_STRUCT_TIMESPEC', 1)
 endif
 
+if cc.has_type('clockid_t', prefix: '#include<time.h>\n#include<pthread.h>')
+  conf_data.set('HAVE_CLOCKID_T', 1)
+endif
+
+
 have_iconv = cc.has_function('iconv_open', prefix: '#include <iconv.h>')
 dep_iconv = []
 if not have_iconv