ref: e85482baacd9feb689ad5d96d3f39bbfd3473cd6
parent: 67f33e680e94e68a233455b6e767dd0789a5d9d8
author: Martin Storsjö <martin@martin.st>
date: Wed Feb 6 09:20:55 EST 2019
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
--- a/meson.build
+++ b/meson.build
@@ -124,6 +124,10 @@
cdata.set('HAVE_UNISTD_H', 1)
endif
+if cc.check_header('io.h')
+ cdata.set('HAVE_IO_H', 1)
+endif
+
# Function checks
--- a/tools/dav1d.c
+++ b/tools/dav1d.c
@@ -36,6 +36,9 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
+#ifdef HAVE_IO_H
+# include <io.h>
+#endif
#include "dav1d/data.h"