From 2a9e3172b8df65323dd75e29098502e7fa04e0f0 Mon Sep 17 00:00:00 2001 From: "James C. Owens" Date: Sat, 19 Oct 2024 18:18:06 -0400 Subject: [PATCH] Update libzip version and change DirIsWriteable This fixes compilation errors for Windows compiles on certain linux platforms. --- depends/packages/libzip.mk | 5 +++-- src/util.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/depends/packages/libzip.mk b/depends/packages/libzip.mk index fc216b0934..ceca1cdf90 100644 --- a/depends/packages/libzip.mk +++ b/depends/packages/libzip.mk @@ -1,8 +1,8 @@ package=libzip -$(package)_version=1.10.1 +$(package)_version=1.11.1 $(package)_download_path=https://libzip.org/download/ $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=9669ae5dfe3ac5b3897536dc8466a874c8cf2c0e3b1fdd08d75b273884299363 +$(package)_sha256_hash=c0e6fa52a62ba11efd30262290dc6970947aef32e0cc294ee50e9005ceac092a $(package)_dependencies=zlib define $(package)_set_vars @@ -20,6 +20,7 @@ $(package)_config_opts+=-DBUILD_REGRESS=OFF $(package)_config_opts+=-DBUILD_OSSFUZZ=OFF $(package)_config_opts+=-DBUILD_EXAMPLES=OFF $(package)_config_opts+=-DBUILD_DOC=OFF +$(package)_config_opts_mingw32+=-DCMAKE_SYSTEM_IGNORE_PATH=/usr/include endef define $(package)_config_cmds diff --git a/src/util.cpp b/src/util.cpp index 9964cb2588..46c578b73d 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -9,6 +9,7 @@ #include "sync.h" #include "version.h" #include "node/ui_interface.h" +#include #include "util.h" #include #include @@ -189,7 +190,7 @@ bool TryCreateDirectories(const fs::path& p) bool DirIsWritable(const fs::path& directory) { - fs::path tmpFile = directory / fs::unique_path(); + fs::path tmpFile = directory / fs::path(HexStr(FastRandomContext().randbytes(8))); FILE* file = fsbridge::fopen(tmpFile, "a"); if (!file) return false;