summaryrefslogtreecommitdiff
path: root/dev-python/libnacl/files/libnacl-1.7.2-32bit.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/libnacl/files/libnacl-1.7.2-32bit.patch')
-rw-r--r--dev-python/libnacl/files/libnacl-1.7.2-32bit.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/dev-python/libnacl/files/libnacl-1.7.2-32bit.patch b/dev-python/libnacl/files/libnacl-1.7.2-32bit.patch
new file mode 100644
index 000000000000..f8a06d27949a
--- /dev/null
+++ b/dev-python/libnacl/files/libnacl-1.7.2-32bit.patch
@@ -0,0 +1,25 @@
+From f1567460f2d07822f2125778a55bf90b74ef807f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 12 Apr 2021 15:10:09 +0200
+Subject: [PATCH] Fix crypto_kdf_derive_from_key() on 32-bit platforms
+
+---
+ libnacl/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libnacl/__init__.py b/libnacl/__init__.py
+index 1aa722a..7649013 100644
+--- a/libnacl/__init__.py
++++ b/libnacl/__init__.py
+@@ -1180,7 +1180,7 @@ def crypto_kdf_derive_from_key(subkey_size, subkey_id, context, master_key):
+ '''
+ size = int(subkey_size)
+ buf = ctypes.create_string_buffer(size)
+- nacl.crypto_kdf_derive_from_key(buf, subkey_size, subkey_id, context, master_key)
++ nacl.crypto_kdf_derive_from_key(buf, subkey_size, ctypes.c_ulonglong(subkey_id), context, master_key)
+ return buf.raw
+
+ # Key Exchange API
+--
+2.31.1
+