Commit e85482ba authored by Martin Storsjö's avatar Martin Storsjö

meson: Check for io.h and include it in dav1d.c if available

With MSVC, io.h holds the declaration of the isatty function.

This fixes this warning:
../tools/dav1d.c(63): warning C4013: 'isatty' undefined; assuming extern returning int
parent 67f33e68
...@@ -124,6 +124,10 @@ if cc.check_header('unistd.h') ...@@ -124,6 +124,10 @@ if cc.check_header('unistd.h')
cdata.set('HAVE_UNISTD_H', 1) cdata.set('HAVE_UNISTD_H', 1)
endif endif
if cc.check_header('io.h')
cdata.set('HAVE_IO_H', 1)
endif
# Function checks # Function checks
......
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#endif #endif
#ifdef HAVE_IO_H
# include <io.h>
#endif
#include "dav1d/data.h" #include "dav1d/data.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