[packages/libotr] - fixed build with libgcrypt 1.11 and recent gcc

qboosh qboosh at pld-linux.org
Wed Jul 2 19:49:34 CEST 2025


commit c6e8bd625a79c14c3fc93f4dbba092a4c561649e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Jul 2 19:51:01 2025 +0200

    - fixed build with libgcrypt 1.11 and recent gcc

 libotr-socket.patch | 29 +++++++++++++++++++++++++++++
 libotr.spec         | 13 ++++++++++++-
 2 files changed, 41 insertions(+), 1 deletion(-)
---
diff --git a/libotr.spec b/libotr.spec
index 215718b..c781c2f 100644
--- a/libotr.spec
+++ b/libotr.spec
@@ -7,8 +7,12 @@ License:	LGPL v2.1 (library), GPL v2 (toolkit)
 Group:		Libraries
 Source0:	http://www.cypherpunks.ca/otr/%{name}-%{version}.tar.gz
 # Source0-md5:	dac5a8778a35f674c046ddf5d97e4d81
+Patch0:		%{name}-socket.patch
 URL:		http://www.cypherpunks.ca/otr/
+BuildRequires:	autoconf >= 2.50
+BuildRequires:	automake
 BuildRequires:	libgcrypt-devel >= 1.2.0
+BuildRequires:	libtool >= 2:2
 Requires:	libgcrypt >= 1.2.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -47,9 +51,16 @@ Statyczna biblioteka OTR.
 
 %prep
 %setup -q
+%patch -P0 -p1
 
 %build
-%configure
+%{__libtoolize}
+%{__aclocal} -I config
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+	--disable-silent-rules
 %{__make}
 
 %install
diff --git a/libotr-socket.patch b/libotr-socket.patch
new file mode 100644
index 0000000..31fd40d
--- /dev/null
+++ b/libotr-socket.patch
@@ -0,0 +1,29 @@
+Missing include for socket operations + argument fix for epoll_wait()
+--- libotr-4.1.1/tests/regression/client/client.c.orig	2015-12-25 18:39:45.000000000 +0100
++++ libotr-4.1.1/tests/regression/client/client.c	2025-07-02 19:33:28.353631258 +0200
+@@ -26,6 +26,7 @@
+ #include <stdlib.h>
+ #include <syscall.h>
+ #include <sys/epoll.h>
++#include <sys/socket.h>
+ #include <sys/types.h>
+ #include <sys/un.h>
+ #include <unistd.h>
+@@ -666,7 +667,7 @@ static void *alice_thread(void *data)
+ 		 */
+ 		timeout = (rand() % (timeout_max - 1));
+ 
+-		ret = epoll_wait(epfd, ev, sizeof(ev), timeout);
++		ret = epoll_wait(epfd, ev, sizeof(ev) / sizeof(struct epoll_event), timeout);
+ 		if (ret < 0) {
+ 			perror("epoll_wait Alice");
+ 			goto end;
+@@ -812,7 +813,7 @@ static void *bob_thread(void *data)
+ 		 */
+ 		timeout = (rand() % (timeout_max - 1));
+ 
+-		ret = epoll_wait(epfd, ev, sizeof(ev), timeout);
++		ret = epoll_wait(epfd, ev, sizeof(ev) / sizeof(struct epoll_event), timeout);
+ 		if (ret < 0) {
+ 			perror("epoll_wait Bob");
+ 			goto end;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libotr.git/commitdiff/c6e8bd625a79c14c3fc93f4dbba092a4c561649e



More information about the pld-cvs-commit mailing list