浏览代码

meson: autodetect timespec

Alexandre Janniaux 5 年之前
父节点
当前提交
2654be6e1c
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      meson.build

+ 6 - 0
meson.build

@@ -109,6 +109,12 @@ if cc.has_function('nl_langinfo')
   conf_data.set('HAVE_NL_LANGINFO', 1)
 endif
 
+# Check for struct timespec
+if cc.has_type('struct timespec', prefix: '#include <time.h>')
+  conf_data.set('HAVE_STRUCT_TIMESPEC', 1)
+endif
+
+
 config_header = configure_file(
   output: 'config.h',
   configuration: conf_data)