From 26c560bc824a9cba0a03f4d898f5bad8e713e0e0 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 15 Sep 2024 13:35:18 +0300 Subject: [PATCH] thirdparty: fix compilation of programs using miniz.h on macos --- cmd/tools/vtest-all.v | 7 +++++++ thirdparty/zip/miniz.h | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cmd/tools/vtest-all.v b/cmd/tools/vtest-all.v index e00b5d16162c4d..3ac76c4ea9ece0 100644 --- a/cmd/tools/vtest-all.v +++ b/cmd/tools/vtest-all.v @@ -402,6 +402,13 @@ fn get_all_commands() []Command { rmfile: 'v.c' } } + $if linux || macos { + res << Command{ + line: '${vexe} -gc none -no-retry-compilation -cc tcc -d use_openssl -showcc examples/veb/todo/main.v' + okmsg: 'A simple veb app, compiles with `-gc none -no-retry-compilation -cc tcc -d use_openssl` on macos and linux' + rmfile: 'examples/veb/todo/main' + } + } $if linux { res << Command{ line: '${vexe} vlib/v/tests/bench/bench_stbi_load.v && prlimit -v10485760 vlib/v/tests/bench/bench_stbi_load' diff --git a/thirdparty/zip/miniz.h b/thirdparty/zip/miniz.h index d120ce8726a6b5..aa5f991f456f6f 100644 --- a/thirdparty/zip/miniz.h +++ b/thirdparty/zip/miniz.h @@ -5026,7 +5026,7 @@ static int mz_mkdir(const char *pDirname) { } #ifndef MINIZ_NO_TIME -#if (defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)) && !defined(FREEBSD) +#if ( defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)) && !defined(FREEBSD) #include #else #include @@ -5073,7 +5073,7 @@ static int mz_mkdir(const char *pDirname) { #elif defined(__TINYC__) #ifndef MINIZ_NO_TIME -#if (defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)) && !defined(FREEBSD) +#if ( defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)) && !defined(FREEBSD) #include #else #include