]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
depends: polyseed: allow compiling on 32-bit machines
authortobtoht <tob@featherwallet.org>
Fri, 23 Dec 2022 12:53:58 +0000 (13:53 +0100)
committertobtoht <tob@featherwallet.org>
Fri, 23 Dec 2022 12:53:58 +0000 (13:53 +0100)
contrib/depends/packages/polyseed.mk
contrib/depends/patches/polyseed/32-bit.patch [new file with mode: 0644]

index 76737a30d0de268eb77e33bc4893ef1b7c6a41c4..726aa7147c663470ed0fb70229ba36895d4fe14a 100644 (file)
@@ -4,11 +4,12 @@ $(package)_download_path=https://github.com/tevador/polyseed/archive/refs/tags/
 $(package)_file_name=v$($(package)_version).tar.gz
 $(package)_sha256_hash=45f1e6c08575286581079e6e26d341a3a33abe1f1ee2d026bd098cf632ea2349
 $(package)_dependencies=native_cmake
-$(package)_patches=no_shared.patch force-static-mingw.patch
+$(package)_patches=no_shared.patch force-static-mingw.patch 32-bit.patch
 
 define $(package)_preprocess_cmds
     patch -p1 < $($(package)_patch_dir)/no_shared.patch && \
-    patch -p1 < $($(package)_patch_dir)/force-static-mingw.patch
+    patch -p1 < $($(package)_patch_dir)/force-static-mingw.patch && \
+    patch -p1 < $($(package)_patch_dir)/32-bit.patch
 endef
 
 define $(package)_config_cmds
diff --git a/contrib/depends/patches/polyseed/32-bit.patch b/contrib/depends/patches/polyseed/32-bit.patch
new file mode 100644 (file)
index 0000000..07da254
--- /dev/null
@@ -0,0 +1,25 @@
+From 8c51b00cb98381a791ef3dcda39f76bebaf9d68f Mon Sep 17 00:00:00 2001
+From: tobtoht <tob@featherwallet.org>
+Date: Fri, 23 Dec 2022 13:51:36 +0100
+Subject: [PATCH] allow compiling on 32-bit machines
+
+---
+ src/birthday.h | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/birthday.h b/src/birthday.h
+index 822883a..5af79aa 100644
+--- a/src/birthday.h
++++ b/src/birthday.h
+@@ -7,8 +7,6 @@
+ #include <time.h>
+ #include <assert.h>
+-static_assert(sizeof(time_t) == 8, "time_t must be a 64-bit type.");
+-
+ #define EPOCH ((uint64_t)1635768000)  /* 1st November 2021 12:00 UTC */
+ #define TIME_STEP ((uint64_t)2629746) /* 30.436875 days = 1/12 of the Gregorian year */
+-- 
+2.39.0
+