[packages/libss7] - fix build on x32

baggins baggins at pld-linux.org
Fri May 8 09:29:12 CEST 2026


commit e5780742aa4a44f0ad374c063f7b87d9f96b1dca
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri May 8 11:29:04 2026 +0200

    - fix build on x32

 libss7.spec |  6 ++++--
 x32.patch   | 28 ++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 2 deletions(-)
---
diff --git a/libss7.spec b/libss7.spec
index 6c9d5cb..0791727 100644
--- a/libss7.spec
+++ b/libss7.spec
@@ -7,6 +7,7 @@ License:	GPL v2
 Group:		Libraries
 Source0:	http://downloads.asterisk.org/pub/telephony/libss7/%{name}-%{version}.tar.gz
 # Source0-md5:	d3b8814f60595a6723a8cb2b47413180
+Patch0:		x32.patch
 URL:		http://www.asterisk.org/
 BuildRequires:	dahdi-tools-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -51,6 +52,7 @@ Statyczna biblioteka libss7.
 
 %prep
 %setup -q
+%patch -P0 -p1
 
 %build
 %{__make} \
@@ -73,11 +75,11 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc ChangeLog NEWS-* README libss7-%{version}-summary.txt
-%attr(755,root,root) %{_libdir}/libss7.so.*.*
+%{_libdir}/libss7.so.*.*
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libss7.so
+%{_libdir}/libss7.so
 %{_includedir}/libss7.h
 
 %files static
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..3ad9206
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,28 @@
+--- libss7-2.0.1/ss7.c~	2021-08-27 17:31:44.000000000 +0200
++++ libss7-2.0.1/ss7.c	2026-05-08 11:27:11.833348164 +0200
+@@ -651,7 +651,11 @@
+ 				if (link->mtp3_timer[x] > -1) {
+ 					strcpy(p, mtp3_timer2str(x));
+ 					p += strlen(p);
++#if defined(__x86_64__) && defined( __ILP32__)
++					sprintf(p, "(%llis)%c", ss7->ss7_sched[ss7->links[i]->mtp3_timer[x]].when.tv_sec - time(NULL),
++#else
+ 					sprintf(p, "(%lis)%c", ss7->ss7_sched[ss7->links[i]->mtp3_timer[x]].when.tv_sec - time(NULL),
++#endif
+ 						ss7->ss7_sched[ss7->links[i]->mtp3_timer[x]].callback ? ' ' : '!');
+ 					p += strlen(p);
+ 				}
+--- libss7-2.0.1/isup.c~	2021-08-27 17:31:44.000000000 +0200
++++ libss7-2.0.1/isup.c	2026-05-08 11:28:27.616681545 +0200
+@@ -5247,7 +5247,11 @@
+ 
+ 		for (x = 0; x < ISUP_MAX_TIMERS; x++) {
+ 			if (c->timer[x] > -1) {
++#if defined(__x86_64__) && defined( __ILP32__)
++				buf_used = ss7_snprintf(buf, buf_used, buf_size, "%s(%lli) ", isup_timer2str(x),  ss7->ss7_sched[c->timer[x]].when.tv_sec - time(NULL));
++#else
+ 				buf_used = ss7_snprintf(buf, buf_used, buf_size, "%s(%li) ", isup_timer2str(x),  ss7->ss7_sched[c->timer[x]].when.tv_sec - time(NULL));
++#endif
+ 			}
+ 		}
+ 		cust_printf(fd, "%s\n", buf);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libss7.git/commitdiff/e5780742aa4a44f0ad374c063f7b87d9f96b1dca



More information about the pld-cvs-commit mailing list