[packages/epic4] improve struct sockaddr_storage availability check

atler atler at pld-linux.org
Mon Jul 1 18:20:32 CEST 2024


commit 30a96262a51c4a4ead486b8a101fea96a07488a7
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Jul 1 17:49:59 2024 +0200

    improve struct sockaddr_storage availability check
    
    pattern matching header file is fragile and got broken by glibc change:
    https://sourceware.org/git/?p=glibc.git;a=commit;h=26e7005

 epic4.spec        |  2 ++
 type-checks.patch | 15 +++++++++++++++
 2 files changed, 17 insertions(+)
---
diff --git a/epic4.spec b/epic4.spec
index a36bc7d..ca17e4a 100644
--- a/epic4.spec
+++ b/epic4.spec
@@ -15,6 +15,7 @@ Patch1:		%{name}-gethostname_is_in_libc_aka_no_libnsl.patch
 Patch2:		%{name}-config_file_path.patch
 Patch3:		gcc10.patch
 Patch4:		perl-config.patch
+Patch5:		type-checks.patch
 URL:		http://www.epicsol.org/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -41,6 +42,7 @@ program wykorzystywany do łączenia się z serwerami IRC na całym
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %build
 %{__aclocal}
diff --git a/type-checks.patch b/type-checks.patch
new file mode 100644
index 0000000..f5075d3
--- /dev/null
+++ b/type-checks.patch
@@ -0,0 +1,15 @@
+--- epic4-2.10.6/configure.in.orig	2024-07-01 14:09:38.511727569 +0200
++++ epic4-2.10.6/configure.in	2024-07-01 16:41:45.537845474 +0200
+@@ -521,8 +521,10 @@
+ ],[AC_MSG_RESULT(yes)])
+ 
+ AC_MSG_CHECKING(for struct sockaddr_storage)
+-AC_EGREP_HEADER([struct( |	)*sockaddr_storage], sys/socket.h, 
+-  AC_MSG_RESULT(yes) 
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
++    [#include <sys/socket.h>],
++    [struct sockaddr_storage ss;])],
++  AC_MSG_RESULT(yes)
+   AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE),
+   AC_MSG_RESULT(no))
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/epic4.git/commitdiff/30a96262a51c4a4ead486b8a101fea96a07488a7



More information about the pld-cvs-commit mailing list