SHA256
1
0
forked from pool/ldns
ldns/ldns-swig-32bit.patch
Adam Majer d7ff69717a - Added ldns-swig-4.2.patch and ldns-swig-32bit.patch in order to
avoid C99 viloations which are compile time errors by default with
  GCC 14. [boo#1225794]

Assuming the request is OK, please also forward it to Factory soonish
so that we can switch the default compiler.  Thank you.

OBS-URL: https://build.opensuse.org/package/show/server:dns/ldns?expand=0&rev=47
2024-07-11 08:11:13 +00:00

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;
}