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

