From: Chun-wei Fan Date: Mon, 24 Jan 2022 11:35:40 +0000 (+0800) Subject: build: Add Visual Studio compat headers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89f72af327ba275a7a5f192f23e653d0d2a4f5ed;p=thirdparty%2Fvala.git build: Add Visual Studio compat headers Visual Studio does not come with unistd.h and utime.h, so building items that originate from glib-2.0.vapi et al will fail if items that depend on these headers are used. Do overcome this, add compat headers for them that will include the appropriate headers from Visual Studio (or the Windows SDK), to fix the build. --- diff --git a/msvc/unistd.h b/msvc/unistd.h new file mode 100644 index 000000000..7ba841347 --- /dev/null +++ b/msvc/unistd.h @@ -0,0 +1,10 @@ +/* Compatbility header for Visual Studio-like builds */ + +#ifndef _MSC_VER +# error This header is for Visual Studio-like builds only +#endif + +#include +#include +#include + diff --git a/msvc/utime.h b/msvc/utime.h new file mode 100644 index 000000000..3fdf86fa8 --- /dev/null +++ b/msvc/utime.h @@ -0,0 +1,7 @@ +/* compat header for MSVC builds */ + +#ifndef _MSC_VER +#error This compat header is for Visual Studio-like builds only +#endif + +#include