diff options
Diffstat (limited to 'patches/wownero')
| -rw-r--r-- | patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch | 4 | ||||
| -rw-r--r-- | patches/wownero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch | 4 | ||||
| -rw-r--r-- | patches/wownero/0003-fix-is_trivially_copyable.patch | 4 | ||||
| -rw-r--r-- | patches/wownero/0004-store-crash-fix.patch | 4 | ||||
| -rw-r--r-- | patches/wownero/0005-Update-android-ndk.patch | 153 | ||||
| -rw-r--r-- | patches/wownero/0005-uint64_t-missing-definition-fix.patch (renamed from patches/wownero/0006-uint64_t-missing-definition-fix.patch) | 4 | ||||
| -rw-r--r-- | patches/wownero/0006-use-proper-error-handling-in-get_seed.patch (renamed from patches/wownero/0007-use-proper-error-handling-in-get_seed.patch) | 4 | ||||
| -rw-r--r-- | patches/wownero/0007-UR-functions.patch (renamed from patches/wownero/0008-UR-functions.patch) | 6 | ||||
| -rw-r--r-- | patches/wownero/0008-add-dummy-device-for-ledger.patch (renamed from patches/wownero/0009-add-dummy-device-for-ledger.patch) | 110 | ||||
| -rw-r--r-- | patches/wownero/0009-polyseed.patch (renamed from patches/wownero/0010-polyseed.patch) | 8 | ||||
| -rw-r--r-- | patches/wownero/0010-coin-control.patch (renamed from patches/wownero/0011-coin-control.patch) | 6 | ||||
| -rw-r--r-- | patches/wownero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch (renamed from patches/wownero/0012-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch) | 4 | ||||
| -rw-r--r-- | patches/wownero/0012-Add-recoverDeterministicWalletFromSpendKey.patch (renamed from patches/wownero/0013-Add-recoverDeterministicWalletFromSpendKey.patch) | 8 | ||||
| -rw-r--r-- | patches/wownero/0013-add-monero-submodule-support.patch (renamed from patches/wownero/0015-add-monero-submodule-support.patch) | 4 | ||||
| -rw-r--r-- | patches/wownero/0014-build-wownero-seed.patch | 614 | ||||
| -rw-r--r-- | patches/wownero/0014-fix-iOS-depends-build.patch (renamed from patches/wownero/0017-iOS-depends-build.patch) | 6 | ||||
| -rw-r--r-- | patches/wownero/0015-include-locale-only-when-targeting-WIN32.patch (renamed from patches/wownero/0016-include-locale-only-when-targeting-WIN32.patch) | 12 | ||||
| -rw-r--r-- | patches/wownero/0017-ledger-dummy-fix.patch | 157 |
18 files changed, 106 insertions, 1006 deletions
diff --git a/patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch b/patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch index d41e362..df672bd 100644 --- a/patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch +++ b/patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch @@ -1,7 +1,7 @@ -From a722b7a7ca6b887ad56650ac2b331088547b221c Mon Sep 17 00:00:00 2001 +From 82bdb3dcf75f9e6bd8c5e31a125b8acc154a0623 Mon Sep 17 00:00:00 2001 From: j-berman <justinberman@protonmail.com> Date: Thu, 13 Oct 2022 18:33:33 -0700 -Subject: [PATCH 01/17] wallet: background sync with just the view key +Subject: [PATCH 01/15] wallet: background sync with just the view key - When background syncing, the wallet wipes the spend key from memory and processes all new transactions. The wallet saves diff --git a/patches/wownero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch b/patches/wownero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch index 8bd89c4..d922a40 100644 --- a/patches/wownero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch +++ b/patches/wownero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch @@ -1,7 +1,7 @@ -From 36f3c8e3a69c2cca71ce7fcc9a5095e9153170ce Mon Sep 17 00:00:00 2001 +From 21e95275c2e40454d9cce05c1139d8139af16587 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto <cyjan@mrcyjanek.net> Date: Wed, 23 Oct 2024 15:18:21 +0200 -Subject: [PATCH 02/17] fix missing ___clear_cache when targetting iOS +Subject: [PATCH 02/15] fix missing ___clear_cache when targetting iOS --- external/randomwow | 2 +- diff --git a/patches/wownero/0003-fix-is_trivially_copyable.patch b/patches/wownero/0003-fix-is_trivially_copyable.patch index 553af86..f600003 100644 --- a/patches/wownero/0003-fix-is_trivially_copyable.patch +++ b/patches/wownero/0003-fix-is_trivially_copyable.patch @@ -1,7 +1,7 @@ -From 8c4d673da3adc9c97962e09dc62ce29de73be829 Mon Sep 17 00:00:00 2001 +From b41551e7dd8d3f4968f330f60d14773eaabca818 Mon Sep 17 00:00:00 2001 From: cyan <cyjan@mrcyjanek.net> Date: Tue, 22 Oct 2024 10:23:18 +0000 -Subject: [PATCH 03/17] fix is_trivially_copyable +Subject: [PATCH 03/15] fix is_trivially_copyable --- contrib/epee/include/span.h | 2 -- diff --git a/patches/wownero/0004-store-crash-fix.patch b/patches/wownero/0004-store-crash-fix.patch index 739c67f..0f15183 100644 --- a/patches/wownero/0004-store-crash-fix.patch +++ b/patches/wownero/0004-store-crash-fix.patch @@ -1,7 +1,7 @@ -From fb3c06a713325f63bc090c5e09e46a63bdaa8c2d Mon Sep 17 00:00:00 2001 +From 9dc9c8048d3918fe3615e91ab8be342471167c26 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto <cyjan@mrcyjanek.net> Date: Sat, 11 May 2024 16:25:10 +0200 -Subject: [PATCH 04/17] store crash fix +Subject: [PATCH 04/15] store crash fix Monero wallet crashes (sometimes) when it is syncing, while the proper solution (that can be seen in feather) diff --git a/patches/wownero/0005-Update-android-ndk.patch b/patches/wownero/0005-Update-android-ndk.patch deleted file mode 100644 index 8a781b6..0000000 --- a/patches/wownero/0005-Update-android-ndk.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 05d9d0ca610daab96634ffaddafeeb7ff931148c Mon Sep 17 00:00:00 2001 -From: Czarek Nakamoto <cyjan@mrcyjanek.net> -Date: Thu, 23 May 2024 08:02:49 +0200 -Subject: [PATCH 05/17] Update android ndk - -rename arm -> armv7a ---- - contrib/depends/hosts/android.mk | 18 ++++++++++++---- - contrib/depends/packages/android_ndk.mk | 28 ++++++++++++++++++------- - contrib/depends/packages/boost.mk | 1 + - contrib/depends/packages/openssl.mk | 2 +- - contrib/depends/toolchain.cmake.in | 13 ++++++------ - 5 files changed, 44 insertions(+), 18 deletions(-) - -diff --git a/contrib/depends/hosts/android.mk b/contrib/depends/hosts/android.mk -index d6f8b99dd..827103c36 100644 ---- a/contrib/depends/hosts/android.mk -+++ b/contrib/depends/hosts/android.mk -@@ -1,12 +1,22 @@ - ANDROID_API=21 -- --ifeq ($(host_arch),arm) --host_toolchain=arm-linux-androideabi- -+host_toolchain=nonexistent -+ifeq ($(host_arch),armv7a) -+host_toolchain=armv7a-linux-androideabi${ANDROID_API}- -+endif -+ifeq ($(host_arch),x86_64) -+host_toolchain=x86_64-linux-android${ANDROID_API}- -+endif -+ifeq ($(host_arch),i686) -+host_toolchain=i686-linux-android${ANDROID_API}- -+endif -+ifeq ($(host_arch),aarch64) -+host_toolchain=aarch64-linux-android${ANDROID_API}- - endif - - android_CC=$(host_toolchain)clang - android_CXX=$(host_toolchain)clang++ --android_RANLIB=: -+android_RANLIB=llvm-ranlib -+android_AR=llvm-ar - - android_CFLAGS=-pipe - android_CXXFLAGS=$(android_CFLAGS) -diff --git a/contrib/depends/packages/android_ndk.mk b/contrib/depends/packages/android_ndk.mk -index 9b8a5332f..2c2914ec2 100644 ---- a/contrib/depends/packages/android_ndk.mk -+++ b/contrib/depends/packages/android_ndk.mk -@@ -1,12 +1,16 @@ - package=android_ndk --$(package)_version=17b -+$(package)_version=26d - $(package)_download_path=https://dl.google.com/android/repository/ --$(package)_file_name=android-ndk-r$($(package)_version)-linux-x86_64.zip --$(package)_sha256_hash=5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd -+$(package)_file_name=android-ndk-r$($(package)_version)-linux.zip -+$(package)_sha256_hash=eefeafe7ccf177de7cc57158da585e7af119bb7504a63604ad719e4b2a328b54 -+ -+$(package)_version_apiversion=21 - - define $(package)_set_vars --$(package)_config_opts_arm=--arch arm -+$(package)_config_opts_armv7a=--arch arm - $(package)_config_opts_aarch64=--arch arm64 -+$(package)_config_opts_x86_64=--arch x86_64 -+$(package)_config_opts_i686=--arch x86 - endef - - define $(package)_extract_cmds -@@ -14,9 +18,19 @@ define $(package)_extract_cmds - unzip -q $($(1)_source_dir)/$($(package)_file_name) - endef - -+# arm-linux-androideabi-ar - openssl workaround -+ - define $(package)_stage_cmds -- android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api 21 \ -- --install-dir $(build_prefix) --stl=libc++ $($(package)_config_opts) &&\ -- mv $(build_prefix) $($(package)_staging_dir)/$(host_prefix) -+ mkdir -p $(build_prefix) &&\ -+ echo $(build_prefix)/toolchain && \ -+ android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api $($(package)_version_apiversion) \ -+ --install-dir $(build_prefix)/toolchain --stl=libc++ $($(package)_config_opts) &&\ -+ mv $(build_prefix)/toolchain $($(package)_staging_dir)/$(host_prefix)/native && \ -+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)$($(package)_version_apiversion)-ar &&\ -+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/arm-linux-androideabi-ar &&\ -+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)$($(package)_version_apiversion)-ranlib &&\ -+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/arm-linux-androideabi-ranlib &&\ -+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)-ar &&\ -+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)-ranlib - endef - -diff --git a/contrib/depends/packages/boost.mk b/contrib/depends/packages/boost.mk -index fd06c5393..c17e863cc 100644 ---- a/contrib/depends/packages/boost.mk -+++ b/contrib/depends/packages/boost.mk -@@ -25,6 +25,7 @@ $(package)_archiver_darwin=$($(package)_libtool) - $(package)_config_libraries=chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale - $(package)_cxxflags=-std=c++11 - $(package)_cxxflags_linux=-fPIC -+$(package)_cxxflags_android=-fPIC - $(package)_cxxflags_freebsd=-fPIC - endef - -diff --git a/contrib/depends/packages/openssl.mk b/contrib/depends/packages/openssl.mk -index a157762c7..2430f6495 100644 ---- a/contrib/depends/packages/openssl.mk -+++ b/contrib/depends/packages/openssl.mk -@@ -34,7 +34,7 @@ $(package)_config_opts_x86_64_linux=linux-x86_64 - $(package)_config_opts_i686_linux=linux-generic32 - $(package)_config_opts_arm_linux=linux-generic32 - $(package)_config_opts_aarch64_linux=linux-generic64 --$(package)_config_opts_arm_android=--static android-arm -+$(package)_config_opts_armv7a_android=--static android-arm - $(package)_config_opts_aarch64_android=--static android-arm64 - $(package)_config_opts_aarch64_darwin=darwin64-arm64-cc - $(package)_config_opts_riscv64_linux=linux-generic64 -diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in -index f118c754e..cc1d9b5c5 100644 ---- a/contrib/depends/toolchain.cmake.in -+++ b/contrib/depends/toolchain.cmake.in -@@ -100,20 +100,21 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - SET(LLVM_ENABLE_PIE OFF) - elseif(CMAKE_SYSTEM_NAME STREQUAL "Android") - SET(ANDROID TRUE) -- if(ARCHITECTURE STREQUAL "arm") -+ if(ARCHITECTURE STREQUAL "armv7a") - SET(CMAKE_ANDROID_ARCH_ABI "armeabi-v7a") - SET(CMAKE_SYSTEM_PROCESSOR "armv7-a") - SET(CMAKE_ANDROID_ARM_MODE ON) -- SET(CMAKE_C_COMPILER_TARGET arm-linux-androideabi) -- SET(CMAKE_CXX_COMPILER_TARGET arm-linux-androideabi) -- SET(_CMAKE_TOOLCHAIN_PREFIX arm-linux-androideabi-) -+ SET(CMAKE_C_COMPILER_TARGET armv7a-linux-androideabi21) -+ SET(CMAKE_CXX_COMPILER_TARGET armv7a-linux-androideabi21) -+ SET(_CMAKE_TOOLCHAIN_PREFIX armv7a-linux-androideabi21-) - elseif(ARCHITECTURE STREQUAL "aarch64") - SET(CMAKE_ANDROID_ARCH_ABI "arm64-v8a") - SET(CMAKE_SYSTEM_PROCESSOR "aarch64") - endif() - SET(CMAKE_ANDROID_STANDALONE_TOOLCHAIN @prefix@/native) -- SET(CMAKE_C_COMPILER "${_CMAKE_TOOLCHAIN_PREFIX}clang") -- SET(CMAKE_CXX_COMPILER "${_CMAKE_TOOLCHAIN_PREFIX}clang++") -+ SET(_ANDROID_STANDALONE_TOOLCHAIN_API 21) -+ SET(CMAKE_C_COMPILER @CC@) -+ SET(CMAKE_CXX_COMPILER @CXX@) - else() - SET(CMAKE_C_COMPILER @CC@) - SET(CMAKE_CXX_COMPILER @CXX@) --- -2.39.5 (Apple Git-154) - diff --git a/patches/wownero/0006-uint64_t-missing-definition-fix.patch b/patches/wownero/0005-uint64_t-missing-definition-fix.patch index 8ee8e0b..05bef1f 100644 --- a/patches/wownero/0006-uint64_t-missing-definition-fix.patch +++ b/patches/wownero/0005-uint64_t-missing-definition-fix.patch @@ -1,7 +1,7 @@ -From aca7cc3b8a3c2c19d46c07b2f0b5b9d6d23cbde6 Mon Sep 17 00:00:00 2001 +From 223e2e4b5b2c6366d0dd4130a726c4cfcdb13ffb Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto <cyjan@mrcyjanek.net> Date: Mon, 2 Sep 2024 16:40:31 +0200 -Subject: [PATCH 06/17] uint64_t missing definition fix +Subject: [PATCH 05/15] uint64_t missing definition fix --- contrib/epee/include/net/http_base.h | 2 +- diff --git a/patches/wownero/0007-use-proper-error-handling-in-get_seed.patch b/patches/wownero/0006-use-proper-error-handling-in-get_seed.patch index 1781efb..8f10b80 100644 --- a/patches/wownero/0007-use-proper-error-handling-in-get_seed.patch +++ b/patches/wownero/0006-use-proper-error-handling-in-get_seed.patch @@ -1,7 +1,7 @@ -From 8539d33a80d584afddf4aed7cd653afbb1d578e0 Mon Sep 17 00:00:00 2001 +From 776d22d6dc47739074f004979894f3c62d43a0c9 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto <cyjan@mrcyjanek.net> Date: Mon, 24 Jun 2024 10:49:12 +0200 -Subject: [PATCH 07/17] use proper error handling in get_seed +Subject: [PATCH 06/15] use proper error handling in get_seed --- src/wallet/api/wallet.cpp | 17 ++++++++++++----- diff --git a/patches/wownero/0008-UR-functions.patch b/patches/wownero/0007-UR-functions.patch index e6991ae..ad0592c 100644 --- a/patches/wownero/0008-UR-functions.patch +++ b/patches/wownero/0007-UR-functions.patch @@ -1,7 +1,7 @@ -From 0fe44ec3cb8f4b210e2c7a8a6191abfe89d250a9 Mon Sep 17 00:00:00 2001 +From 1302c64b0218da6d32b9dd9cbf1c2c56f51e6aff Mon Sep 17 00:00:00 2001 From: tobtoht <tob@featherwallet.org> Date: Tue, 12 Mar 2024 10:09:50 +0100 -Subject: [PATCH 08/17] UR functions +Subject: [PATCH 07/15] UR functions This commit adds UR functions for UR tasks, I believe that the right place to get @@ -85,7 +85,7 @@ index 79d449054..83d83036b 100644 ifeq (aarch64, $(host_arch)) CC_target=arm64-apple-$(host_os) diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in -index cc1d9b5c5..48a6f947e 100644 +index f118c754e..f26655d68 100644 --- a/contrib/depends/toolchain.cmake.in +++ b/contrib/depends/toolchain.cmake.in @@ -94,7 +94,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") diff --git a/patches/wownero/0009-add-dummy-device-for-ledger.patch b/patches/wownero/0008-add-dummy-device-for-ledger.patch index acd7b0c..6d40bb2 100644 --- a/patches/wownero/0009-add-dummy-device-for-ledger.patch +++ b/patches/wownero/0008-add-dummy-device-for-ledger.patch @@ -1,21 +1,22 @@ -From 08301e22d38bf69b35cda50111f95af120f98a3f Mon Sep 17 00:00:00 2001 +From 07a3019d94feb48f746dbc780db1e4d2e0d6080c Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto <cyjan@mrcyjanek.net> Date: Wed, 26 Jun 2024 15:04:38 +0200 -Subject: [PATCH 09/17] add dummy device for ledger +Subject: [PATCH 08/15] add dummy device for ledger --- - CMakeLists.txt | 6 +- - src/device/CMakeLists.txt | 6 +- - src/device/device.cpp | 10 ++- - src/device/device.hpp | 12 +-- - src/device/device_io_dummy.cpp | 133 +++++++++++++++++++++++++++++++++ - src/device/device_io_dummy.hpp | 74 ++++++++++++++++++ - src/device/device_ledger.cpp | 6 +- - src/device/device_ledger.hpp | 7 +- - src/wallet/api/wallet.cpp | 94 +++++++++++++++++++++++ - src/wallet/api/wallet.h | 18 +++++ - src/wallet/api/wallet2_api.h | 12 +++ - 11 files changed, 357 insertions(+), 21 deletions(-) + CMakeLists.txt | 6 +- + src/device/CMakeLists.txt | 6 +- + src/device/device.cpp | 10 ++- + src/device/device.hpp | 12 +-- + src/device/device_io_dummy.cpp | 133 ++++++++++++++++++++++++++++++ + src/device/device_io_dummy.hpp | 74 +++++++++++++++++ + src/device/device_ledger.cpp | 6 +- + src/device/device_ledger.hpp | 7 +- + src/wallet/api/wallet.cpp | 94 +++++++++++++++++++++ + src/wallet/api/wallet.h | 18 ++++ + src/wallet/api/wallet2_api.h | 12 +++ + src/wallet/api/wallet_manager.cpp | 12 ++- + 12 files changed, 365 insertions(+), 25 deletions(-) create mode 100644 src/device/device_io_dummy.cpp create mode 100644 src/device/device_io_dummy.hpp @@ -68,7 +69,7 @@ index e4f1159b5..14d398f87 100644 ${device_headers} device_ledger.hpp diff --git a/src/device/device.cpp b/src/device/device.cpp -index e6cd358b6..636929feb 100644 +index e6cd358b6..777584c01 100644 --- a/src/device/device.cpp +++ b/src/device/device.cpp @@ -29,7 +29,7 @@ @@ -130,7 +131,7 @@ index 392703a24..ffd419779 100644 diff --git a/src/device/device_io_dummy.cpp b/src/device/device_io_dummy.cpp new file mode 100644 -index 000000000..fb082694e +index 000000000..edb4beea3 --- /dev/null +++ b/src/device/device_io_dummy.cpp @@ -0,0 +1,133 @@ @@ -174,7 +175,7 @@ index 000000000..fb082694e +// Data transport is made available in wallet2_api.h, so wallet developers can easily plug their +// own USB/BLE/other transport layer. + -+#ifdef HIDAPI_DUMMY ++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI) +#include <boost/scope_exit.hpp> +#include "log.hpp" +#include "device_io_dummy.hpp" @@ -234,13 +235,13 @@ index 000000000..fb082694e + MDEBUG("exchange(): waitsForDeviceSend"); + // NOTE: waitsForDeviceSend should be changed by external code + while (waitsForDeviceSend) { -+ sleep(1); ++ usleep(1000); + MDEBUG("exchange(): waitsForDeviceSend (still)"); + } + + MDEBUG("exchange(): waitsForDeviceReceive"); + while (waitsForDeviceReceive) { -+ sleep(1); ++ usleep(1000); + MDEBUG("exchange(): waitsForDeviceReceive (still)"); + } + @@ -349,7 +350,7 @@ index 000000000..a1733616d + +#endif // HAVE_HIDAPI diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp -index 8403d76e8..db40a2eb7 100644 +index 8403d76e8..0587eb7d3 100644 --- a/src/device/device_ledger.cpp +++ b/src/device/device_ledger.cpp @@ -41,7 +41,7 @@ namespace hw { @@ -374,14 +375,14 @@ index 8403d76e8..db40a2eb7 100644 bool device_ledger::connect(void) { this->disconnect(); -+ #ifndef HIDAPI_DUMMY ++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) hw_device.connect(known_devices); + #endif this->reset(); #ifdef DEBUG_HWDEVICE cryptonote::account_public_address pubkey; diff --git a/src/device/device_ledger.hpp b/src/device/device_ledger.hpp -index 03058c4f1..506f27c4a 100644 +index 03058c4f1..39454ca6d 100644 --- a/src/device/device_ledger.hpp +++ b/src/device/device_ledger.hpp @@ -35,6 +35,7 @@ @@ -405,7 +406,7 @@ index 03058c4f1..506f27c4a 100644 mutable boost::mutex command_locker; //IO -+#ifdef HIDAPI_DUMMY ++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI) + hw::io::device_io_dummy hw_device; +#else hw::io::device_io_hid hw_device; @@ -414,14 +415,14 @@ index 03058c4f1..506f27c4a 100644 unsigned char buffer_send[BUFFER_SEND_SIZE]; unsigned int length_recv; diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index ee000e7ab..375edb4f1 100644 +index ee000e7ab..556e2a8ce 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -48,6 +48,9 @@ #include <boost/locale.hpp> #include <boost/filesystem.hpp> #include "bc-ur/src/bc-ur.hpp" -+#ifdef HIDAPI_DUMMY ++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI) +#include "device/device_io_dummy.hpp" +#endif @@ -434,8 +435,8 @@ index ee000e7ab..375edb4f1 100644 + +// HIDAPI_DUMMY +bool WalletImpl::getStateIsConnected() { -+ #ifndef HIDAPI_DUMMY -+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); ++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) ++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); + return false; + #else + return hw::io::device_io_dummy::stateIsConnected; @@ -443,8 +444,8 @@ index ee000e7ab..375edb4f1 100644 +} + +unsigned char* WalletImpl::getSendToDevice() { -+ #ifndef HIDAPI_DUMMY -+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); ++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) ++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); + return {}; + #else + return hw::io::device_io_dummy::sendToDevice; @@ -452,8 +453,8 @@ index ee000e7ab..375edb4f1 100644 +} + +size_t WalletImpl::getSendToDeviceLength() { -+ #ifndef HIDAPI_DUMMY -+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); ++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) ++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); + return -1; + #else + return hw::io::device_io_dummy::sendToDeviceLength; @@ -461,8 +462,8 @@ index ee000e7ab..375edb4f1 100644 +} + +unsigned char* WalletImpl::getReceivedFromDevice() { -+ #ifndef HIDAPI_DUMMY -+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); ++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) ++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); + return {}; + #else + return hw::io::device_io_dummy::receivedFromDevice; @@ -470,8 +471,8 @@ index ee000e7ab..375edb4f1 100644 +} + +size_t WalletImpl::getReceivedFromDeviceLength() { -+ #ifndef HIDAPI_DUMMY -+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); ++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) ++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); + return -1; + #else + return hw::io::device_io_dummy::receivedFromDeviceLength; @@ -479,8 +480,8 @@ index ee000e7ab..375edb4f1 100644 +} + +bool WalletImpl::getWaitsForDeviceSend() { -+ #ifndef HIDAPI_DUMMY -+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); ++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) ++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); + return false; + #else + return hw::io::device_io_dummy::receivedFromDeviceLength; @@ -488,8 +489,8 @@ index ee000e7ab..375edb4f1 100644 +} + +bool WalletImpl::getWaitsForDeviceReceive() { -+ #ifndef HIDAPI_DUMMY -+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); ++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) ++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); + return false; + #else + return hw::io::device_io_dummy::waitsForDeviceReceive; @@ -497,8 +498,8 @@ index ee000e7ab..375edb4f1 100644 +} + +void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) { -+ #ifndef HIDAPI_DUMMY -+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); ++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) ++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); + return; + #else + hw::io::device_io_dummy::receivedFromDevice = static_cast<unsigned char *>(malloc(len)); @@ -510,8 +511,8 @@ index ee000e7ab..375edb4f1 100644 +} + +void WalletImpl::setDeviceSendData(unsigned char* data, size_t len) { -+ #ifndef HIDAPI_DUMMY -+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); ++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) ++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); + return; + #else + hw::io::device_io_dummy::sendToDevice = static_cast<unsigned char *>(malloc(len)); @@ -575,6 +576,29 @@ index 764adbfbf..53ec4abfc 100644 }; /** +diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp +index e81b8f83a..277be6ac9 100644 +--- a/src/wallet/api/wallet_manager.cpp ++++ b/src/wallet/api/wallet_manager.cpp +@@ -188,10 +188,14 @@ bool WalletManagerImpl::verifyWalletPassword(const std::string &keys_file_name, + + bool WalletManagerImpl::queryWalletDevice(Wallet::Device& device_type, const std::string &keys_file_name, const std::string &password, uint64_t kdf_rounds) const + { +- hw::device::device_type type; +- bool r = tools::wallet2::query_device(type, keys_file_name, password, kdf_rounds); +- device_type = static_cast<Wallet::Device>(type); +- return r; ++ try { ++ hw::device::device_type type; ++ bool r = tools::wallet2::query_device(type, keys_file_name, password, kdf_rounds); ++ device_type = static_cast<Wallet::Device>(type); ++ return r; ++ } catch (...) { ++ return false; ++ } + } + + std::vector<std::string> WalletManagerImpl::findWallets(const std::string &path) -- 2.39.5 (Apple Git-154) diff --git a/patches/wownero/0010-polyseed.patch b/patches/wownero/0009-polyseed.patch index e7711c9..aa5af28 100644 --- a/patches/wownero/0010-polyseed.patch +++ b/patches/wownero/0009-polyseed.patch @@ -1,7 +1,7 @@ -From d1e443859c1b9e6845874fc30f7958da389846b3 Mon Sep 17 00:00:00 2001 +From c1f5cc2d9b71b7b923b17c33c23b23da918e4751 Mon Sep 17 00:00:00 2001 From: tobtoht <tob@featherwallet.org> Date: Tue, 12 Mar 2024 09:42:37 +0100 -Subject: [PATCH 10/17] polyseed +Subject: [PATCH 09/15] polyseed Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net> --- @@ -998,7 +998,7 @@ index 000000000..2c8c777a7 +#endif //POLYSEED_HPP \ No newline at end of file diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 375edb4f1..0d785360a 100644 +index 556e2a8ce..704e5e148 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -728,6 +728,28 @@ bool WalletImpl::recoverFromDevice(const std::string &path, const std::string &p @@ -1153,7 +1153,7 @@ index 53ec4abfc..be1c3704e 100644 * \brief Closes wallet. In case operation succeeded, wallet object deleted. in case operation failed, wallet object not deleted * \param wallet previously opened / created wallet instance diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp -index e81b8f83a..c79fe25d6 100644 +index 277be6ac9..da2056d8a 100644 --- a/src/wallet/api/wallet_manager.cpp +++ b/src/wallet/api/wallet_manager.cpp @@ -156,6 +156,15 @@ Wallet *WalletManagerImpl::createWalletFromDevice(const std::string &path, diff --git a/patches/wownero/0011-coin-control.patch b/patches/wownero/0010-coin-control.patch index f786777..2362fed 100644 --- a/patches/wownero/0011-coin-control.patch +++ b/patches/wownero/0010-coin-control.patch @@ -1,7 +1,7 @@ -From 7d9d947f049c39aa9e5e4c7cb37c03e63eaf3187 Mon Sep 17 00:00:00 2001 +From 14bcfd4bb49e7697c034d3d38c988f90a1842145 Mon Sep 17 00:00:00 2001 From: tobtoht <tob@featherwallet.org> Date: Tue, 12 Mar 2024 11:07:57 +0100 -Subject: [PATCH 11/17] coin control +Subject: [PATCH 10/15] coin control --- src/simplewallet/simplewallet.cpp | 2 +- @@ -504,7 +504,7 @@ index 000000000..c43e45abd + +#endif //FEATHER_COINS_INFO_H diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 0d785360a..ff1baac5c 100644 +index 704e5e148..e69910e69 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -35,6 +35,7 @@ diff --git a/patches/wownero/0012-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch b/patches/wownero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch index 3868907..f130f51 100644 --- a/patches/wownero/0012-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch +++ b/patches/wownero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch @@ -1,7 +1,7 @@ -From fc519329a5eaeaacd53ceb5109608069d57ac553 Mon Sep 17 00:00:00 2001 +From 7c4f0b36d627bf4d1ce198240c1e974eff27bbec Mon Sep 17 00:00:00 2001 From: M <m@cakewallet.com> Date: Fri, 21 Apr 2023 15:43:47 -0400 -Subject: [PATCH 12/17] Add hex encoding and tx key getter for +Subject: [PATCH 11/15] Add hex encoding and tx key getter for PendingTransction in wallet api. --- diff --git a/patches/wownero/0013-Add-recoverDeterministicWalletFromSpendKey.patch b/patches/wownero/0012-Add-recoverDeterministicWalletFromSpendKey.patch index 033050d..a15e54c 100644 --- a/patches/wownero/0013-Add-recoverDeterministicWalletFromSpendKey.patch +++ b/patches/wownero/0012-Add-recoverDeterministicWalletFromSpendKey.patch @@ -1,7 +1,7 @@ -From 3523d4ea3449b64065f7fa512a0017581b76c1c8 Mon Sep 17 00:00:00 2001 +From 298c7e0745306605d7ed1cee320b92eacf8aaeb6 Mon Sep 17 00:00:00 2001 From: Konstantin Ullrich <konstantinullrich12@gmail.com> Date: Wed, 11 Oct 2023 16:47:59 +0200 -Subject: [PATCH 13/17] Add recoverDeterministicWalletFromSpendKey +Subject: [PATCH 12/15] Add recoverDeterministicWalletFromSpendKey This function is used by Cake Wallet to enable polyseed (dart implementation) support. @@ -19,7 +19,7 @@ Co-authored-by: Godwin Asuquo <godilite@gmail.com> 5 files changed, 75 insertions(+) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index ff1baac5c..685432597 100644 +index e69910e69..e650e6044 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -824,6 +824,35 @@ bool WalletImpl::recover(const std::string &path, const std::string &password, c @@ -104,7 +104,7 @@ index f421fdc05..c8d6bb179 100644 * \deprecated this method creates a wallet WITHOUT a passphrase, use createWalletFromKeys(..., password, ...) instead * \brief recovers existing wallet using keys. Creates a view only wallet if spend key is omitted diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp -index c79fe25d6..f88bd9e64 100644 +index da2056d8a..c200f52ae 100644 --- a/src/wallet/api/wallet_manager.cpp +++ b/src/wallet/api/wallet_manager.cpp @@ -127,6 +127,22 @@ Wallet *WalletManagerImpl::createWalletFromKeys(const std::string &path, diff --git a/patches/wownero/0015-add-monero-submodule-support.patch b/patches/wownero/0013-add-monero-submodule-support.patch index 4ef6bd2..f220055 100644 --- a/patches/wownero/0015-add-monero-submodule-support.patch +++ b/patches/wownero/0013-add-monero-submodule-support.patch @@ -1,7 +1,7 @@ -From 24bc8f2b4ead8cb848a979140129618d04ebc762 Mon Sep 17 00:00:00 2001 +From 1bd61531746e983799fcae9d3a7228620bbc84f5 Mon Sep 17 00:00:00 2001 From: cyan <cyjan@mrcyjanek.net> Date: Thu, 7 Nov 2024 16:46:24 +0000 -Subject: [PATCH 15/17] add monero submodule support +Subject: [PATCH 13/15] add monero submodule support --- CMakeLists.txt | 6 +++--- diff --git a/patches/wownero/0014-build-wownero-seed.patch b/patches/wownero/0014-build-wownero-seed.patch deleted file mode 100644 index 2b7f867..0000000 --- a/patches/wownero/0014-build-wownero-seed.patch +++ /dev/null @@ -1,614 +0,0 @@ -From 8d1cd10b2514d225ae5d2d6f73947529647392e7 Mon Sep 17 00:00:00 2001 -From: Czarek Nakamoto <cyjan@mrcyjanek.net> -Date: Thu, 25 Apr 2024 10:06:04 +0200 -Subject: [PATCH 14/17] build wownero-seed - ---- - contrib/depends/hosts/android.mk | 4 +- - contrib/depends/hosts/darwin.mk | 1 + - contrib/depends/hosts/mingw32.mk | 3 + - contrib/depends/packages/packages.mk | 2 +- - contrib/depends/packages/wownero_seed.mk | 35 ++ - .../0001-fix-duplicate-symbol-error.patch | 497 ++++++++++++++++++ - 6 files changed, 539 insertions(+), 3 deletions(-) - create mode 100644 contrib/depends/packages/wownero_seed.mk - create mode 100644 contrib/depends/patches/wownero_seed/0001-fix-duplicate-symbol-error.patch - -diff --git a/contrib/depends/hosts/android.mk b/contrib/depends/hosts/android.mk -index 827103c36..8aad7ec65 100644 ---- a/contrib/depends/hosts/android.mk -+++ b/contrib/depends/hosts/android.mk -@@ -15,8 +15,8 @@ endif - - android_CC=$(host_toolchain)clang - android_CXX=$(host_toolchain)clang++ --android_RANLIB=llvm-ranlib --android_AR=llvm-ar -+android_RANLIB=$(host_toolchain)ranlib -+android_AR=$(host_toolchain)ar - - android_CFLAGS=-pipe - android_CXXFLAGS=$(android_CFLAGS) -diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk -index b14ee5c5b..2168702aa 100644 ---- a/contrib/depends/hosts/darwin.mk -+++ b/contrib/depends/hosts/darwin.mk -@@ -9,6 +9,7 @@ darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --s - darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)- - - darwin_RANLIB=$(host_prefix)/native/bin/$(host)-ranlib -+darwin_AR=$(host_prefix)/native/bin/$(host)-ar - - darwin_CFLAGS=-pipe - darwin_CXXFLAGS=$(darwin_CFLAGS) -diff --git a/contrib/depends/hosts/mingw32.mk b/contrib/depends/hosts/mingw32.mk -index ccc4c5082..4677694a6 100644 ---- a/contrib/depends/hosts/mingw32.mk -+++ b/contrib/depends/hosts/mingw32.mk -@@ -2,6 +2,9 @@ mingw32_CFLAGS=-pipe - mingw32_CXXFLAGS=$(mingw32_CFLAGS) - mingw32_ARFLAGS=cr - -+mingw32_RANLIB=$(shell which $(host)-ranlib) -+mingw32_AR=$(shell which $(host)-ar) -+ - mingw32_release_CFLAGS=-O2 - mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS) - -diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk -index 8783d4955..3d513c5a2 100644 ---- a/contrib/depends/packages/packages.mk -+++ b/contrib/depends/packages/packages.mk -@@ -1,4 +1,4 @@ --packages:=boost openssl zeromq libiconv expat unbound polyseed -+packages:=boost openssl zeromq libiconv expat unbound polyseed wownero_seed - - # ccache is useless in gitian builds - ifneq ($(GITIAN),1) -diff --git a/contrib/depends/packages/wownero_seed.mk b/contrib/depends/packages/wownero_seed.mk -new file mode 100644 -index 000000000..b376f80c5 ---- /dev/null -+++ b/contrib/depends/packages/wownero_seed.mk -@@ -0,0 +1,35 @@ -+package=wownero_seed -+$(package)_version=0.3.0 -+$(package)_download_path=https://github.com/MrCyjaneK/wownero-seed/archive/ -+$(package)_download_file=d3f68be347facfeebbd8f68fd74982c705cb917b.tar.gz -+$(package)_file_name=$(package)-$($(package)_version).tar.gz -+$(package)_sha256_hash=3b59ccde08e0fee204680240af4b270a18a677aa0e6036a3504570193d232406 -+$(package)_patches=0001-fix-duplicate-symbol-error.patch -+ -+define $(package)_preprocess_cmds -+ patch -p1 < $($(package)_patch_dir)/0001-fix-duplicate-symbol-error.patch -+endef -+ -+ -+ifeq ($(host_os),darwin) -+ define $(package)_config_cmds -+ CC="$($(package)_cc)" CXX="$($(package)_cxx)" cmake -DCMAKE_RANLIB="$($(package)_ranlib)" -DCMAKE_AR="$($(package)_ar)" -DCMAKE_INSTALL_PREFIX="$(host_prefix)" -DCMAKE_POSITION_INDEPENDENT_CODE=ON . -+ endef -+else -+ define $(package)_config_cmds -+ CC="$($(package)_cc)" CXX="$($(package)_cxx)" cmake -DCMAKE_INSTALL_PREFIX="$(host_prefix)" -DCMAKE_POSITION_INDEPENDENT_CODE=ON . -+ endef -+endif -+ -+define $(package)_set_vars -+ $(package)_build_opts=CC="$($(package)_cc)" CXX="$($(package)_cxx)" -+endef -+ -+ -+define $(package)_build_cmds -+ CC="$($(package)_cc)" CXX="$($(package)_cxx)" $(MAKE) VERBOSE=1 -+endef -+ -+define $(package)_stage_cmds -+ CC="$($(package)_cc)" CXX="$($(package)_cxx)" $(MAKE) DESTDIR=$($(package)_staging_dir) install -+endef -diff --git a/contrib/depends/patches/wownero_seed/0001-fix-duplicate-symbol-error.patch b/contrib/depends/patches/wownero_seed/0001-fix-duplicate-symbol-error.patch -new file mode 100644 -index 000000000..a8f8fe059 ---- /dev/null -+++ b/contrib/depends/patches/wownero_seed/0001-fix-duplicate-symbol-error.patch -@@ -0,0 +1,497 @@ -+From 4be93209afb80b11834a0849391ee6eeb68aec4a Mon Sep 17 00:00:00 2001 -+From: Czarek Nakamoto <cyjan@mrcyjanek.net> -+Date: Thu, 25 Apr 2024 09:37:37 +0200 -+Subject: [PATCH] fix duplicate symbol error -+ -+--- -+ src/argon2/argon2.c | 8 +++--- -+ src/argon2/argon2.h | 4 +-- -+ src/argon2/blake2/blake2.h | 12 ++++----- -+ src/argon2/blake2/blake2b.c | 46 ++++++++++++++++---------------- -+ src/argon2/core.c | 52 ++++++++++++++++++------------------- -+ src/argon2/core.h | 17 ++++++------ -+ src/argon2/ref.c | 2 +- -+ 7 files changed, 70 insertions(+), 71 deletions(-) -+ -+diff --git a/src/argon2/argon2.c b/src/argon2/argon2.c -+index e9882b7..470dc26 100644 -+--- a/src/argon2/argon2.c -++++ b/src/argon2/argon2.c -+@@ -37,7 +37,7 @@ const char *argon2_type2string(argon2_type type, int uppercase) { -+ -+ int argon2_ctx(argon2_context *context, argon2_type type) { -+ /* 1. Validate all inputs */ -+- int result = validate_inputs(context); -++ int result = validate_inputs_wowseed(context); -+ uint32_t memory_blocks, segment_length; -+ argon2_instance_t instance; -+ -+@@ -78,20 +78,20 @@ int argon2_ctx(argon2_context *context, argon2_type type) { -+ /* 3. Initialization: Hashing inputs, allocating memory, filling first -+ * blocks -+ */ -+- result = initialize(&instance, context); -++ result = initialize_wowseed(&instance, context); -+ -+ if (ARGON2_OK != result) { -+ return result; -+ } -+ -+ /* 4. Filling memory */ -+- result = fill_memory_blocks(&instance); -++ result = _fill_memory_blocks_wowseed(&instance); -+ -+ if (ARGON2_OK != result) { -+ return result; -+ } -+ /* 5. Finalization */ -+- finalize(context, &instance); -++ finalize_wowseed(context, &instance); -+ -+ return ARGON2_OK; -+ } -+diff --git a/src/argon2/argon2.h b/src/argon2/argon2.h -+index 1b471f6..f60e269 100644 -+--- a/src/argon2/argon2.h -++++ b/src/argon2/argon2.h -+@@ -185,7 +185,7 @@ typedef void (*deallocate_fptr)(uint8_t *memory, size_t bytes_to_allocate); -+ * 4 parallel lanes. -+ * You want to erase the password, but you're OK with last pass not being -+ * erased. You want to use the default memory allocator. -+- * Then you initialize: -++ * Then you initialize_wowseed: -+ Argon2_Context(out,8,pwd,32,salt,16,NULL,0,NULL,0,5,1<<20,4,4,NULL,NULL,true,false,false,false) -+ */ -+ typedef struct Argon2_Context { -+@@ -329,7 +329,7 @@ ARGON2_PUBLIC int argon2_hash(const uint32_t t_cost, const uint32_t m_cost, -+ -+ /** -+ * Verifies a password against an encoded string -+- * Encoded string is restricted as in validate_inputs() -++ * Encoded string is restricted as in validate_inputs_wowseed() -+ * @param encoded String encoding parameters, salt, hash -+ * @param pwd Pointer to password -+ * @pre Returns ARGON2_OK if successful -+diff --git a/src/argon2/blake2/blake2.h b/src/argon2/blake2/blake2.h -+index 9f97e1c..25b445d 100644 -+--- a/src/argon2/blake2/blake2.h -++++ b/src/argon2/blake2/blake2.h -+@@ -67,15 +67,15 @@ enum { -+ }; -+ -+ /* Streaming API */ -+-ARGON2_LOCAL int blake2b_init(blake2b_state *S, size_t outlen); -+-ARGON2_LOCAL int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, -++ARGON2_LOCAL int blake2b_init_wowseed(blake2b_state *S, size_t outlen); -++ARGON2_LOCAL int blake2b_init_key_wowseed(blake2b_state *S, size_t outlen, const void *key, -+ size_t keylen); -+-ARGON2_LOCAL int blake2b_init_param(blake2b_state *S, const blake2b_param *P); -+-ARGON2_LOCAL int blake2b_update(blake2b_state *S, const void *in, size_t inlen); -+-ARGON2_LOCAL int blake2b_final(blake2b_state *S, void *out, size_t outlen); -++ARGON2_LOCAL int blake2b_init_param_wowseed(blake2b_state *S, const blake2b_param *P); -++ARGON2_LOCAL int blake2b_update_wowseed(blake2b_state *S, const void *in, size_t inlen); -++ARGON2_LOCAL int blake2b_final_wowseed(blake2b_state *S, void *out, size_t outlen); -+ -+ /* Simple API */ -+-ARGON2_LOCAL int blake2b(void *out, size_t outlen, const void *in, size_t inlen, -++ARGON2_LOCAL int blake2b_wowseed(void *out, size_t outlen, const void *in, size_t inlen, -+ const void *key, size_t keylen); -+ -+ /* Argon2 Team - Begin Code */ -+diff --git a/src/argon2/blake2/blake2b.c b/src/argon2/blake2/blake2b.c -+index ca05df5..8138b86 100644 -+--- a/src/argon2/blake2/blake2b.c -++++ b/src/argon2/blake2/blake2b.c -+@@ -70,7 +70,7 @@ static BLAKE2_INLINE void blake2b_init0(blake2b_state *S) { -+ memcpy(S->h, blake2b_IV, sizeof(S->h)); -+ } -+ -+-int blake2b_init_param(blake2b_state *S, const blake2b_param *P) { -++int blake2b_init_param_wowseed(blake2b_state *S, const blake2b_param *P) { -+ const unsigned char *p = (const unsigned char *)P; -+ unsigned int i; -+ -+@@ -88,7 +88,7 @@ int blake2b_init_param(blake2b_state *S, const blake2b_param *P) { -+ } -+ -+ /* Sequential blake2b initialization */ -+-int blake2b_init(blake2b_state *S, size_t outlen) { -++int blake2b_init_wowseed(blake2b_state *S, size_t outlen) { -+ blake2b_param P; -+ -+ if (S == NULL) { -+@@ -113,10 +113,10 @@ int blake2b_init(blake2b_state *S, size_t outlen) { -+ memset(P.salt, 0, sizeof(P.salt)); -+ memset(P.personal, 0, sizeof(P.personal)); -+ -+- return blake2b_init_param(S, &P); -++ return blake2b_init_param_wowseed(S, &P); -+ } -+ -+-int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, -++int blake2b_init_key_wowseed(blake2b_state *S, size_t outlen, const void *key, -+ size_t keylen) { -+ blake2b_param P; -+ -+@@ -147,7 +147,7 @@ int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, -+ memset(P.salt, 0, sizeof(P.salt)); -+ memset(P.personal, 0, sizeof(P.personal)); -+ -+- if (blake2b_init_param(S, &P) < 0) { -++ if (blake2b_init_param_wowseed(S, &P) < 0) { -+ blake2b_invalidate_state(S); -+ return -1; -+ } -+@@ -156,7 +156,7 @@ int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, -+ uint8_t block[BLAKE2B_BLOCKBYTES]; -+ memset(block, 0, BLAKE2B_BLOCKBYTES); -+ memcpy(block, key, keylen); -+- blake2b_update(S, block, BLAKE2B_BLOCKBYTES); -++ blake2b_update_wowseed(S, block, BLAKE2B_BLOCKBYTES); -+ /* Burn the key from stack */ -+ clear_internal_memory(block, BLAKE2B_BLOCKBYTES); -+ } -+@@ -221,7 +221,7 @@ static void blake2b_compress(blake2b_state *S, const uint8_t *block) { -+ #undef ROUND -+ } -+ -+-int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { -++int blake2b_update_wowseed(blake2b_state *S, const void *in, size_t inlen) { -+ const uint8_t *pin = (const uint8_t *)in; -+ -+ if (inlen == 0) { -+@@ -261,7 +261,7 @@ int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { -+ return 0; -+ } -+ -+-int blake2b_final(blake2b_state *S, void *out, size_t outlen) { -++int blake2b_final_wowseed(blake2b_state *S, void *out, size_t outlen) { -+ uint8_t buffer[BLAKE2B_OUTBYTES] = {0}; -+ unsigned int i; -+ -+@@ -291,7 +291,7 @@ int blake2b_final(blake2b_state *S, void *out, size_t outlen) { -+ return 0; -+ } -+ -+-int blake2b(void *out, size_t outlen, const void *in, size_t inlen, -++int blake2b_wowseed(void *out, size_t outlen, const void *in, size_t inlen, -+ const void *key, size_t keylen) { -+ blake2b_state S; -+ int ret = -1; -+@@ -310,19 +310,19 @@ int blake2b(void *out, size_t outlen, const void *in, size_t inlen, -+ } -+ -+ if (keylen > 0) { -+- if (blake2b_init_key(&S, outlen, key, keylen) < 0) { -++ if (blake2b_init_key_wowseed(&S, outlen, key, keylen) < 0) { -+ goto fail; -+ } -+ } else { -+- if (blake2b_init(&S, outlen) < 0) { -++ if (blake2b_init_wowseed(&S, outlen) < 0) { -+ goto fail; -+ } -+ } -+ -+- if (blake2b_update(&S, in, inlen) < 0) { -++ if (blake2b_update_wowseed(&S, in, inlen) < 0) { -+ goto fail; -+ } -+- ret = blake2b_final(&S, out, outlen); -++ ret = blake2b_final_wowseed(&S, out, outlen); -+ -+ fail: -+ clear_internal_memory(&S, sizeof(S)); -+@@ -352,25 +352,25 @@ int blake2b_long(void *pout, size_t outlen, const void *in, size_t inlen) { -+ } while ((void)0, 0) -+ -+ if (outlen <= BLAKE2B_OUTBYTES) { -+- TRY(blake2b_init(&blake_state, outlen)); -+- TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes))); -+- TRY(blake2b_update(&blake_state, in, inlen)); -+- TRY(blake2b_final(&blake_state, out, outlen)); -++ TRY(blake2b_init_wowseed(&blake_state, outlen)); -++ TRY(blake2b_update_wowseed(&blake_state, outlen_bytes, sizeof(outlen_bytes))); -++ TRY(blake2b_update_wowseed(&blake_state, in, inlen)); -++ TRY(blake2b_final_wowseed(&blake_state, out, outlen)); -+ } else { -+ uint32_t toproduce; -+ uint8_t out_buffer[BLAKE2B_OUTBYTES]; -+ uint8_t in_buffer[BLAKE2B_OUTBYTES]; -+- TRY(blake2b_init(&blake_state, BLAKE2B_OUTBYTES)); -+- TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes))); -+- TRY(blake2b_update(&blake_state, in, inlen)); -+- TRY(blake2b_final(&blake_state, out_buffer, BLAKE2B_OUTBYTES)); -++ TRY(blake2b_init_wowseed(&blake_state, BLAKE2B_OUTBYTES)); -++ TRY(blake2b_update_wowseed(&blake_state, outlen_bytes, sizeof(outlen_bytes))); -++ TRY(blake2b_update_wowseed(&blake_state, in, inlen)); -++ TRY(blake2b_final_wowseed(&blake_state, out_buffer, BLAKE2B_OUTBYTES)); -+ memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); -+ out += BLAKE2B_OUTBYTES / 2; -+ toproduce = (uint32_t)outlen - BLAKE2B_OUTBYTES / 2; -+ -+ while (toproduce > BLAKE2B_OUTBYTES) { -+ memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); -+- TRY(blake2b(out_buffer, BLAKE2B_OUTBYTES, in_buffer, -++ TRY(blake2b_wowseed(out_buffer, BLAKE2B_OUTBYTES, in_buffer, -+ BLAKE2B_OUTBYTES, NULL, 0)); -+ memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); -+ out += BLAKE2B_OUTBYTES / 2; -+@@ -378,7 +378,7 @@ int blake2b_long(void *pout, size_t outlen, const void *in, size_t inlen) { -+ } -+ -+ memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); -+- TRY(blake2b(out_buffer, toproduce, in_buffer, BLAKE2B_OUTBYTES, NULL, -++ TRY(blake2b_wowseed(out_buffer, toproduce, in_buffer, BLAKE2B_OUTBYTES, NULL, -+ 0)); -+ memcpy(out, out_buffer, toproduce); -+ } -+diff --git a/src/argon2/core.c b/src/argon2/core.c -+index 5eafe08..c25eb53 100644 -+--- a/src/argon2/core.c -++++ b/src/argon2/core.c -+@@ -151,7 +151,7 @@ void clear_internal_memory(void *v, size_t n) { -+ } -+ } -+ -+-void finalize(const argon2_context *context, argon2_instance_t *instance) { -++void finalize_wowseed(const argon2_context *context, argon2_instance_t *instance) { -+ if (context != NULL && instance != NULL) { -+ block blockhash; -+ uint32_t l; -+@@ -256,7 +256,7 @@ uint32_t index_alpha(const argon2_instance_t *instance, -+ } -+ -+ /* Single-threaded version for p=1 case */ -+-static int fill_memory_blocks_st(argon2_instance_t *instance) { -++static int _fill_memory_blocks_wowseed_st(argon2_instance_t *instance) { -+ uint32_t r, s, l; -+ -+ for (r = 0; r < instance->passes; ++r) { -+@@ -273,14 +273,14 @@ static int fill_memory_blocks_st(argon2_instance_t *instance) { -+ return ARGON2_OK; -+ } -+ -+-int fill_memory_blocks(argon2_instance_t *instance) { -++int _fill_memory_blocks_wowseed(argon2_instance_t *instance) { -+ if (instance == NULL || instance->lanes == 0) { -+ return ARGON2_INCORRECT_PARAMETER; -+ } -+- return fill_memory_blocks_st(instance); -++ return _fill_memory_blocks_wowseed_st(instance); -+ } -+ -+-int validate_inputs(const argon2_context *context) { -++int validate_inputs_wowseed(const argon2_context *context) { -+ if (NULL == context) { -+ return ARGON2_INCORRECT_PARAMETER; -+ } -+@@ -407,7 +407,7 @@ int validate_inputs(const argon2_context *context) { -+ return ARGON2_OK; -+ } -+ -+-void fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance) { -++void fill_first_blocks_wowseed(uint8_t *blockhash, const argon2_instance_t *instance) { -+ uint32_t l; -+ /* Make the first and second block in each lane as G(H0||0||i) or -+ G(H0||1||i) */ -+@@ -430,7 +430,7 @@ void fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance) { -+ clear_internal_memory(blockhash_bytes, ARGON2_BLOCK_SIZE); -+ } -+ -+-void initial_hash(uint8_t *blockhash, argon2_context *context, -++void initial_hash_wowseed(uint8_t *blockhash, argon2_context *context, -+ argon2_type type) { -+ blake2b_state BlakeHash; -+ uint8_t value[sizeof(uint32_t)]; -+@@ -439,31 +439,31 @@ void initial_hash(uint8_t *blockhash, argon2_context *context, -+ return; -+ } -+ -+- blake2b_init(&BlakeHash, ARGON2_PREHASH_DIGEST_LENGTH); -++ blake2b_init_wowseed(&BlakeHash, ARGON2_PREHASH_DIGEST_LENGTH); -+ -+ store32(&value, context->lanes); -+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -+ -+ store32(&value, context->outlen); -+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -+ -+ store32(&value, context->m_cost); -+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -+ -+ store32(&value, context->t_cost); -+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -+ -+ store32(&value, context->version); -+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -+ -+ store32(&value, (uint32_t)type); -+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -+ -+ store32(&value, context->pwdlen); -+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -+ -+ if (context->pwd != NULL) { -+- blake2b_update(&BlakeHash, (const uint8_t *)context->pwd, -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)context->pwd, -+ context->pwdlen); -+ -+ if (context->flags & ARGON2_FLAG_CLEAR_PASSWORD) { -+@@ -473,18 +473,18 @@ void initial_hash(uint8_t *blockhash, argon2_context *context, -+ } -+ -+ store32(&value, context->saltlen); -+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -+ -+ if (context->salt != NULL) { -+- blake2b_update(&BlakeHash, (const uint8_t *)context->salt, -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)context->salt, -+ context->saltlen); -+ } -+ -+ store32(&value, context->secretlen); -+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -+ -+ if (context->secret != NULL) { -+- blake2b_update(&BlakeHash, (const uint8_t *)context->secret, -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)context->secret, -+ context->secretlen); -+ -+ if (context->flags & ARGON2_FLAG_CLEAR_SECRET) { -+@@ -494,17 +494,17 @@ void initial_hash(uint8_t *blockhash, argon2_context *context, -+ } -+ -+ store32(&value, context->adlen); -+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value)); -+ -+ if (context->ad != NULL) { -+- blake2b_update(&BlakeHash, (const uint8_t *)context->ad, -++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)context->ad, -+ context->adlen); -+ } -+ -+- blake2b_final(&BlakeHash, blockhash, ARGON2_PREHASH_DIGEST_LENGTH); -++ blake2b_final_wowseed(&BlakeHash, blockhash, ARGON2_PREHASH_DIGEST_LENGTH); -+ } -+ -+-int initialize(argon2_instance_t *instance, argon2_context *context) { -++int initialize_wowseed(argon2_instance_t *instance, argon2_context *context) { -+ uint8_t blockhash[ARGON2_PREHASH_SEED_LENGTH]; -+ int result = ARGON2_OK; -+ -+@@ -523,7 +523,7 @@ int initialize(argon2_instance_t *instance, argon2_context *context) { -+ /* H_0 + 8 extra bytes to produce the first blocks */ -+ /* uint8_t blockhash[ARGON2_PREHASH_SEED_LENGTH]; */ -+ /* Hashing all inputs */ -+- initial_hash(blockhash, context, instance->type); -++ initial_hash_wowseed(blockhash, context, instance->type); -+ /* Zeroing 8 extra bytes */ -+ clear_internal_memory(blockhash + ARGON2_PREHASH_DIGEST_LENGTH, -+ ARGON2_PREHASH_SEED_LENGTH - -+@@ -535,7 +535,7 @@ int initialize(argon2_instance_t *instance, argon2_context *context) { -+ -+ /* 3. Creating first blocks, we always have at least two blocks in a slice -+ */ -+- fill_first_blocks(blockhash, instance); -++ fill_first_blocks_wowseed(blockhash, instance); -+ /* Clearing the hash */ -+ clear_internal_memory(blockhash, ARGON2_PREHASH_SEED_LENGTH); -+ -+diff --git a/src/argon2/core.h b/src/argon2/core.h -+index 78000ba..6b0154c 100644 -+--- a/src/argon2/core.h -++++ b/src/argon2/core.h -+@@ -53,7 +53,7 @@ typedef struct block_ { uint64_t v[ARGON2_QWORDS_IN_BLOCK]; } block; -+ -+ /*****************Functions that work with the block******************/ -+ -+-/* Initialize each byte of the block with @in */ -++/* initialize_wowseed each byte of the block with @in */ -+ void init_block_value(block *b, uint8_t in); -+ -+ /* Copy block @src to block @dst */ -+@@ -158,7 +158,7 @@ uint32_t index_alpha(const argon2_instance_t *instance, -+ * @return ARGON2_OK if everything is all right, otherwise one of error codes -+ * (all defined in <argon2.h> -+ */ -+-int validate_inputs(const argon2_context *context); -++int validate_inputs_wowseed(const argon2_context *context); -+ -+ /* -+ * Hashes all the inputs into @a blockhash[PREHASH_DIGEST_LENGTH], clears -+@@ -170,28 +170,27 @@ int validate_inputs(const argon2_context *context); -+ * @pre @a blockhash must have at least @a PREHASH_DIGEST_LENGTH bytes -+ * allocated -+ */ -+-void initial_hash(uint8_t *blockhash, argon2_context *context, -++void initial_hash_wowseed(uint8_t *blockhash, argon2_context *context, -+ argon2_type type); -+- -+ /* -+ * Function creates first 2 blocks per lane -+ * @param instance Pointer to the current instance -+ * @param blockhash Pointer to the pre-hashing digest -+ * @pre blockhash must point to @a PREHASH_SEED_LENGTH allocated values -+ */ -+-void fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance); -++void fill_first_blocks_wowseed(uint8_t *blockhash, const argon2_instance_t *instance); -+ -+ /* -+ * Function allocates memory, hashes the inputs with Blake, and creates first -+ * two blocks. Returns the pointer to the main memory with 2 blocks per lane -+- * initialized -++ * initialize_wowseedd -+ * @param context Pointer to the Argon2 internal structure containing memory -+ * pointer, and parameters for time and space requirements. -+ * @param instance Current Argon2 instance -+ * @return Zero if successful, -1 if memory failed to allocate. @context->state -+ * will be modified if successful. -+ */ -+-int initialize(argon2_instance_t *instance, argon2_context *context); -++int initialize_wowseed(argon2_instance_t *instance, argon2_context *context); -+ -+ /* -+ * XORing the last block of each lane, hashing it, making the tag. Deallocates -+@@ -204,7 +203,7 @@ int initialize(argon2_instance_t *instance, argon2_context *context); -+ * @pre if context->free_cbk is not NULL, it should point to a function that -+ * deallocates memory -+ */ -+-void finalize(const argon2_context *context, argon2_instance_t *instance); -++void finalize_wowseed(const argon2_context *context, argon2_instance_t *instance); -+ -+ /* -+ * Function that fills the segment using previous segments also from other -+@@ -223,6 +222,6 @@ void fill_segment(const argon2_instance_t *instance, -+ * @param instance Pointer to the current instance -+ * @return ARGON2_OK if successful, @context->state -+ */ -+-int fill_memory_blocks(argon2_instance_t *instance); -++int _fill_memory_blocks_wowseed(argon2_instance_t *instance); -+ -+ #endif -+diff --git a/src/argon2/ref.c b/src/argon2/ref.c -+index ad1cf46..7edbd6e 100644 -+--- a/src/argon2/ref.c -++++ b/src/argon2/ref.c -+@@ -29,7 +29,7 @@ -+ -+ /* -+ * Function fills a new memory block and optionally XORs the old block over the new one. -+- * @next_block must be initialized. -++ * @next_block must be initialize_wowseedd. -+ * @param prev_block Pointer to the previous block -+ * @param ref_block Pointer to the reference block -+ * @param next_block Pointer to the block to be constructed -+-- -+2.39.2 --- -2.39.5 (Apple Git-154) - diff --git a/patches/wownero/0017-iOS-depends-build.patch b/patches/wownero/0014-fix-iOS-depends-build.patch index f8d7134..5e97b89 100644 --- a/patches/wownero/0017-iOS-depends-build.patch +++ b/patches/wownero/0014-fix-iOS-depends-build.patch @@ -1,7 +1,7 @@ -From 9b051041e568ccb3a509a7453aff6ca44fb1c045 Mon Sep 17 00:00:00 2001 +From f9bf382c57e4a36044e7a0697dc36073487eadd3 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto <cyjan@mrcyjanek.net> Date: Thu, 21 Nov 2024 06:05:03 -0500 -Subject: [PATCH] fix iOS depends build +Subject: [PATCH 14/15] fix iOS depends build --- CMakeLists.txt | 4 ---- @@ -11,7 +11,7 @@ Subject: [PATCH] fix iOS depends build 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1397bb217..b9207ef2a 100644 +index 763d240fc..e3a0faacd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,10 +39,6 @@ include(CheckLibraryExists) diff --git a/patches/wownero/0016-include-locale-only-when-targeting-WIN32.patch b/patches/wownero/0015-include-locale-only-when-targeting-WIN32.patch index 725e1ff..512e012 100644 --- a/patches/wownero/0016-include-locale-only-when-targeting-WIN32.patch +++ b/patches/wownero/0015-include-locale-only-when-targeting-WIN32.patch @@ -1,7 +1,7 @@ -From 5843cb6c653a65eab3aea5956b41150b7c94cb0a Mon Sep 17 00:00:00 2001 +From a6538084be4fdfbf84e7cbae2bce040aeaf4a4f9 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto <cyjan@mrcyjanek.net> Date: Mon, 18 Nov 2024 10:57:37 -0500 -Subject: [PATCH 16/17] include locale only when targeting WIN32 +Subject: [PATCH 15/15] include locale only when targeting WIN32 --- CMakeLists.txt | 5 ++++- @@ -9,10 +9,10 @@ Subject: [PATCH 16/17] include locale only when targeting WIN32 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 763d240fc..1397bb217 100644 +index e3a0faacd..b9207ef2a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1100,7 +1100,10 @@ if(STATIC) +@@ -1096,7 +1096,10 @@ if(STATIC) set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_RUNTIME ON) endif() @@ -25,7 +25,7 @@ index 763d240fc..1397bb217 100644 add_definitions(-DBOOST_NO_AUTO_PTR) add_definitions(-DBOOST_UUID_DISABLE_ALIGNMENT) # This restores UUID's std::has_unique_object_representations property diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 685432597..c9ff4b860 100644 +index e650e6044..6d7553a1d 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -46,7 +46,9 @@ @@ -37,7 +37,7 @@ index 685432597..c9ff4b860 100644 +#endif #include <boost/filesystem.hpp> #include "bc-ur/src/bc-ur.hpp" - #ifdef HIDAPI_DUMMY + #if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI) -- 2.39.5 (Apple Git-154) diff --git a/patches/wownero/0017-ledger-dummy-fix.patch b/patches/wownero/0017-ledger-dummy-fix.patch deleted file mode 100644 index 62ded03..0000000 --- a/patches/wownero/0017-ledger-dummy-fix.patch +++ /dev/null @@ -1,157 +0,0 @@ -From a2a5c6a81ae63b2a4a8fe02b7929dcf3084b2a51 Mon Sep 17 00:00:00 2001 -From: cyan <cyjan@mrcyjanek.net> -Date: Tue, 26 Nov 2024 00:31:15 +0000 -Subject: [PATCH 17/17] ledger dummy fix - ---- - src/device/device_io_dummy.cpp | 2 +- - src/device/device_io_dummy.hpp | 2 +- - src/device/device_ledger.hpp | 2 +- - src/wallet/api/wallet.cpp | 36 +++++++++++++++++----------------- - 4 files changed, 21 insertions(+), 21 deletions(-) - -diff --git a/src/device/device_io_dummy.cpp b/src/device/device_io_dummy.cpp -index fb082694e..e7e79fb58 100644 ---- a/src/device/device_io_dummy.cpp -+++ b/src/device/device_io_dummy.cpp -@@ -38,7 +38,7 @@ - // Data transport is made available in wallet2_api.h, so wallet developers can easily plug their - // own USB/BLE/other transport layer. - --#ifdef HIDAPI_DUMMY -+#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI) - #include <boost/scope_exit.hpp> - #include "log.hpp" - #include "device_io_dummy.hpp" -diff --git a/src/device/device_io_dummy.hpp b/src/device/device_io_dummy.hpp -index a1733616d..4a4807121 100644 ---- a/src/device/device_io_dummy.hpp -+++ b/src/device/device_io_dummy.hpp -@@ -26,7 +26,7 @@ - // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - // --#ifdef HIDAPI_DUMMY -+#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI) - - #pragma once - -diff --git a/src/device/device_ledger.hpp b/src/device/device_ledger.hpp -index 506f27c4a..39454ca6d 100644 ---- a/src/device/device_ledger.hpp -+++ b/src/device/device_ledger.hpp -@@ -149,7 +149,7 @@ namespace hw { - mutable boost::mutex command_locker; - - //IO --#ifdef HIDAPI_DUMMY -+#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI) - hw::io::device_io_dummy hw_device; - #else - hw::io::device_io_hid hw_device; -diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index c9ff4b860..313384f54 100644 ---- a/src/wallet/api/wallet.cpp -+++ b/src/wallet/api/wallet.cpp -@@ -3339,8 +3339,8 @@ uint64_t WalletImpl::getBytesSent() - - // HIDAPI_DUMMY - bool WalletImpl::getStateIsConnected() { -- #ifndef HIDAPI_DUMMY -- setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); -+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) -+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); - return false; - #else - return hw::io::device_io_dummy::stateIsConnected; -@@ -3348,8 +3348,8 @@ bool WalletImpl::getStateIsConnected() { - } - - unsigned char* WalletImpl::getSendToDevice() { -- #ifndef HIDAPI_DUMMY -- setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); -+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) -+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); - return {}; - #else - return hw::io::device_io_dummy::sendToDevice; -@@ -3357,8 +3357,8 @@ unsigned char* WalletImpl::getSendToDevice() { - } - - size_t WalletImpl::getSendToDeviceLength() { -- #ifndef HIDAPI_DUMMY -- setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); -+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) -+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); - return -1; - #else - return hw::io::device_io_dummy::sendToDeviceLength; -@@ -3366,8 +3366,8 @@ size_t WalletImpl::getSendToDeviceLength() { - } - - unsigned char* WalletImpl::getReceivedFromDevice() { -- #ifndef HIDAPI_DUMMY -- setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); -+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) -+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); - return {}; - #else - return hw::io::device_io_dummy::receivedFromDevice; -@@ -3375,8 +3375,8 @@ unsigned char* WalletImpl::getReceivedFromDevice() { - } - - size_t WalletImpl::getReceivedFromDeviceLength() { -- #ifndef HIDAPI_DUMMY -- setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); -+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) -+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); - return -1; - #else - return hw::io::device_io_dummy::receivedFromDeviceLength; -@@ -3384,8 +3384,8 @@ size_t WalletImpl::getReceivedFromDeviceLength() { - } - - bool WalletImpl::getWaitsForDeviceSend() { -- #ifndef HIDAPI_DUMMY -- setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); -+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) -+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); - return false; - #else - return hw::io::device_io_dummy::receivedFromDeviceLength; -@@ -3393,8 +3393,8 @@ bool WalletImpl::getWaitsForDeviceSend() { - } - - bool WalletImpl::getWaitsForDeviceReceive() { -- #ifndef HIDAPI_DUMMY -- setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); -+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) -+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); - return false; - #else - return hw::io::device_io_dummy::waitsForDeviceReceive; -@@ -3402,8 +3402,8 @@ bool WalletImpl::getWaitsForDeviceReceive() { - } - - void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) { -- #ifndef HIDAPI_DUMMY -- setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); -+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) -+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); - return; - #else - hw::io::device_io_dummy::receivedFromDevice = static_cast<unsigned char *>(malloc(len)); -@@ -3415,8 +3415,8 @@ void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) { - } - - void WalletImpl::setDeviceSendData(unsigned char* data, size_t len) { -- #ifndef HIDAPI_DUMMY -- setStatusError("MONERO compiled with -DHIDAPI_DUMMY"); -+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)) -+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))"); - return; - #else - hw::io::device_io_dummy::sendToDevice = static_cast<unsigned char *>(malloc(len)); --- -2.39.5 (Apple Git-154) - |
