Commit 92b7e8bd authored by Steve Lhomme's avatar Steve Lhomme

detect unistd.h availability

It doesn't exist on MSVC and it's not needed.
parent 150b4e2c
Pipeline #563 passed with stage
in 1 minute and 11 seconds
...@@ -137,6 +137,10 @@ elif cc.has_function('_aligned_malloc', prefix: '#include <malloc.h>') ...@@ -137,6 +137,10 @@ elif cc.has_function('_aligned_malloc', prefix: '#include <malloc.h>')
cdata.set('HAVE_ALIGNED_MALLOC', 1) cdata.set('HAVE_ALIGNED_MALLOC', 1)
endif endif
if cc.check_header('unistd.h')
cdata.set('HAVE_UNISTD_H', 1)
endif
if (get_option('buildtype') != 'debug' and if (get_option('buildtype') != 'debug' and
get_option('buildtype') != 'plain') get_option('buildtype') != 'plain')
add_project_arguments('-fomit-frame-pointer', '-ffast-math', add_project_arguments('-fomit-frame-pointer', '-ffast-math',
......
...@@ -32,7 +32,9 @@ ...@@ -32,7 +32,9 @@
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <unistd.h> #ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "dav1d/data.h" #include "dav1d/data.h"
......
...@@ -34,7 +34,9 @@ ...@@ -34,7 +34,9 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "dav1d_cli_parse.h" #include "dav1d_cli_parse.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment