ldns/ldns-swig-32bit.patch

34 lines
978 B
Diff

From f91f61e10be595a6a46845112aaed7da24551bf9 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Fri, 26 Jan 2024 11:57:03 +0100
Subject: [PATCH] 32-bit compatibility for Python SWIG bindings
Upstream: https://github.com/NLnetLabs/ldns/pull/233
References: boo#1225794
The ssize_t type can be int instead of long, and the pointer
types are incompatible.
---
contrib/python/ldns.i | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/contrib/python/ldns.i b/contrib/python/ldns.i
index 881ba5e85..b4a740820 100644
--- a/contrib/python/ldns.i
+++ b/contrib/python/ldns.i
@@ -99,12 +99,14 @@
%typemap(in, noblock=1) (ssize_t)
{
int $1_res = 0;
- $1_res = SWIG_AsVal_long($input, &$1);
+ long val;
+ $1_res = SWIG_AsVal_long($input, &val);
if (!SWIG_IsOK($1_res)) {
SWIG_exception_fail(SWIG_ArgError($1_res), "in method '"
"$symname" "', argument " "$argnum" " of type '"
"$type""'");
}
+ $1 = val;
}