[packages/kronosnet] - fix building on x32, rel 2

baggins baggins at pld-linux.org
Sun Jun 30 11:33:50 CEST 2024


commit 33d742adb1f70f3b77f008145b91d844e660b84a
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Jun 30 10:29:25 2024 +0200

    - fix building on x32, rel 2

 kronosnet.spec |  4 +++-
 x32.patch      | 26 ++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)
---
diff --git a/kronosnet.spec b/kronosnet.spec
index 3816870..3bdf05b 100644
--- a/kronosnet.spec
+++ b/kronosnet.spec
@@ -7,11 +7,12 @@ Summary:	Multipoint-to-Multipoint VPN library
 Summary(pl.UTF-8):	Biblioteka VPN wiele-do-wielu
 Name:		kronosnet
 Version:	1.29
-Release:	1
+Release:	2
 License:	LGPL v2.1+ (libraries), GPL v2+ (applications)
 Group:		Libraries
 Source0:	https://kronosnet.org/releases/%{name}-%{version}.tar.xz
 # Source0-md5:	d95a5870ce35ddd12e6cd7a783c0b202
+Patch0:		x32.patch
 URL:		https://kronosnet.org/
 BuildRequires:	bzip2-devel
 BuildRequires:	doxygen
@@ -102,6 +103,7 @@ UWAGA: to oprogramowanie jest eksperymentalne i nie dokończone.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure \
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..68ff57c
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,26 @@
+--- kronosnet-1.29/libknet/links.c.orig	2024-06-06 07:41:34.000000000 +0200
++++ kronosnet-1.29/libknet/links.c	2024-06-30 10:28:25.913871391 +0200
+@@ -896,7 +896,11 @@
+ 
+ 	if ((useconds_t)(interval * 1000) < KNET_THREADS_TIMERES) {
+ 		log_warn(knet_h, KNET_SUB_LINK,
++#if defined(__x86_64__) && defined(__ILP32__)
++			 "host: %u link: %u interval: %llu too small (%s). interval lower than thread_timer_res (%u ms) has no effect",
++#else
+ 			 "host: %u link: %u interval: %lu too small (%s). interval lower than thread_timer_res (%u ms) has no effect",
++#endif
+ 			 host_id, link_id, interval, strerror(savederrno), (KNET_THREADS_TIMERES / 1000));
+ 	}
+ 
+@@ -904,7 +908,11 @@
+ 		err = -1;
+ 		savederrno = EINVAL;
+ 		log_err(knet_h, KNET_SUB_LINK,
++#if defined(__x86_64__) && defined(__ILP32__)
++			"host: %u link: %u pong timeout: %llu too small (%s). timeout cannot be less than thread_timer_res (%u ms)",
++#else
+ 			"host: %u link: %u pong timeout: %lu too small (%s). timeout cannot be less than thread_timer_res (%u ms)",
++#endif
+ 			host_id, link_id, timeout, strerror(savederrno), (KNET_THREADS_TIMERES / 1000));
+ 		goto exit_unlock;
+ 	}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kronosnet.git/commitdiff/33d742adb1f70f3b77f008145b91d844e660b84a



More information about the pld-cvs-commit mailing list