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
parent
534e54f621
commit
13745014c3
|
@ -89,6 +89,9 @@ if get_option('default-options') != ''
|
||||||
else
|
else
|
||||||
configh_data.set('DEFAULT_XKB_OPTIONS', 'NULL')
|
configh_data.set('DEFAULT_XKB_OPTIONS', 'NULL')
|
||||||
endif
|
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')
|
if cc.links('int main(){if(__builtin_expect(1<0,0)){}}', name: '__builtin_expect')
|
||||||
configh_data.set('HAVE___BUILTIN_EXPECT', 1)
|
configh_data.set('HAVE___BUILTIN_EXPECT', 1)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#if HAVE_UNISTD_H
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
Loading…
Reference in New Issue