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>
master
Peter Hutterer 2020-09-07 19:24:12 +10:00 committed by Ran Benita
parent 534e54f621
commit 13745014c3
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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>