test: include unstd.h in the registry test to cut down the MacOS warnings mkdtmp, rmdir and unlink are in unstd.h on MacOS. Since including that it doesn't hurt us on Linux, let's do it without ifdefs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/meson.build b/meson.build
index 046fc54..79acda4 100644
--- a/meson.build
+++ b/meson.build
@@ -89,6 +89,9 @@ if get_option('default-options') != ''
else
configh_data.set('DEFAULT_XKB_OPTIONS', 'NULL')
endif
+if cc.has_header('unistd.h')
+ configh_data.set('HAVE_UNISTD_H', 1)
+endif
if cc.links('int main(){if(__builtin_expect(1<0,0)){}}', name: '__builtin_expect')
configh_data.set('HAVE___BUILTIN_EXPECT', 1)
endif
diff --git a/test/registry.c b/test/registry.c
index fc5f6da..fab3b69 100644
--- a/test/registry.c
+++ b/test/registry.c
@@ -24,6 +24,9 @@
#include "config.h"
#include <assert.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#include <stdarg.h>
#include <stdio.h>
#include <sys/stat.h>