diff --git a/.cirrus.yml b/.cirrus.yml index e920413d18..56bb27115d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -7,7 +7,7 @@ freebsd_instance: freebsd_task: name: FreeBSD Code CI timeout_in: 31m - skip: "!changesInclude('.cirrus.yml', '**.{v,vsh}')" + skip: "!changesInclude('.cirrus.yml', '**.{v,vsh}', '**.c', '**.h')" install_script: pkg install -y git diagnose_env_script: | ## env ## CIRRUS_WORKING_DIR is /tmp/cirrus-ci-build @@ -29,6 +29,9 @@ freebsd_task: diagnose_math_script: | echo 'Diagnose vlib/math/math_test.v' ./v -stats vlib/math/math_test.v + test_zip_modules: | + echo 'Test modules using thirdparty/zip' + ./v test vlib/compress/ vlib/szip/ test_self_script: | echo 'Run test-self' VTEST_JUST_ESSENTIAL=1 ./v test-self diff --git a/thirdparty/zip/miniz.h b/thirdparty/zip/miniz.h index d630810a3c..48694d230b 100644 --- a/thirdparty/zip/miniz.h +++ b/thirdparty/zip/miniz.h @@ -4926,6 +4926,24 @@ static int mz_mkdir(const char *pDirname) { #define MZ_DELETE_FILE remove #define MZ_MKDIR(d) _mkdir(d) +#elif defined(__FreeBSD__) +#ifndef MINIZ_NO_TIME +#include +#endif + +#define MZ_FOPEN(f, m) fopen(f, m) +#define MZ_FCLOSE fclose +#define MZ_FREAD fread +#define MZ_FWRITE fwrite +#define MZ_FTELL64 ftello +#define MZ_FSEEK64 fseeko +#define MZ_FILE_STAT_STRUCT stat +#define MZ_FILE_STAT stat +#define MZ_FFLUSH fflush +#define MZ_FREOPEN(p, m, s) freopen(p, m, s) +#define MZ_DELETE_FILE remove +#define MZ_MKDIR(d) mkdir(d, 0755) + #elif defined(__TINYC__) #ifndef MINIZ_NO_TIME #include