Browse Source

meson: autodetect timespec

Alexandre Janniaux 5 years ago
parent
commit
2654be6e1c
1 changed files with 6 additions and 0 deletions
  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)