From 43b51df75c7be9f4395cfeeb622b5515d627af18 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Mon, 6 Dec 2021 21:10:36 +0100 Subject: [PATCH] Avoid using bad function inet_addr Resolves: rhbz#2029808 --- libgpg-error-1.42-inet_pton.patch | 30 ++++++++++++++++++++++++++++++ libgpg-error.spec | 4 ++++ 2 files changed, 34 insertions(+) create mode 100644 libgpg-error-1.42-inet_pton.patch diff --git a/libgpg-error-1.42-inet_pton.patch b/libgpg-error-1.42-inet_pton.patch new file mode 100644 index 0000000..1973f22 --- /dev/null +++ b/libgpg-error-1.42-inet_pton.patch @@ -0,0 +1,30 @@ +From 75e06a7861cb4a8479a382946217e846e9b58154 Mon Sep 17 00:00:00 2001 +From: Jakub Jelen +Date: Mon, 6 Dec 2021 20:52:57 +0100 +Subject: [PATCH Libgpg-error] configure: Add missing check for logging + +* configure.ac: Add missing check for inet_pton to avoid using inet_addr + in modern systems. +-- + +Signed-off-by: Jakub Jelen +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index da013d8..3686a9c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -215,7 +215,7 @@ AC_SUBST(INSTALLSHELLPATH) + + AC_FUNC_FORK + AC_CHECK_FUNCS([flockfile vasprintf mmap rand strlwr stpcpy setenv stat \ +- getrlimit getpwnam getpwuid getpwnam_r getpwuid_r ]) ++ getrlimit getpwnam getpwuid getpwnam_r getpwuid_r inet_pton ]) + + + # +-- +2.31.1 + diff --git a/libgpg-error.spec b/libgpg-error.spec index 758a14c..7a972cd 100644 --- a/libgpg-error.spec +++ b/libgpg-error.spec @@ -8,7 +8,10 @@ License: LGPLv2+ Source0: https://www.gnupg.org/ftp/gcrypt/libgpg-error/%{name}-%{version}.tar.bz2 Source1: https://www.gnupg.org/ftp/gcrypt/libgpg-error/%{name}-%{version}.tar.bz2.sig Patch1: libgpg-error-1.29-multilib.patch +# https://dev.gnupg.org/T5381 Patch2: libgpg-error-1.42-coverity.patch +# https://dev.gnupg.org/T5720 +Patch3: libgpg-error-1.42-inet_pton.patch BuildRequires: gcc BuildRequires: gawk, gettext, autoconf, automake, gettext-devel, libtool @@ -36,6 +39,7 @@ contains files necessary to develop applications using libgpg-error. %setup -q %patch1 -p1 -b .multilib %patch2 -p1 -b .coverity +%patch3 -p1 -b .inet_pton autoreconf -f