diff --git a/socat-common-fixes.patch b/socat-common-fixes.patch new file mode 100644 index 0000000..b56401c --- /dev/null +++ b/socat-common-fixes.patch @@ -0,0 +1,52 @@ +Index: socat-1.7.3.3/filan.c +=================================================================== +--- socat-1.7.3.3.orig/filan.c ++++ socat-1.7.3.3/filan.c +@@ -20,6 +20,10 @@ + + #include "filan.h" + ++#ifdef WITH_LIBWRAP ++#include ++#endif ++ + + struct sockopt { + int so; +@@ -28,10 +32,6 @@ struct sockopt { + + static int filan_streams_analyze(int fd, FILE *outfile); + +-/* dirty workaround so we dont get an error on AIX when being linked with +- libwrap */ +-int allow_severity, deny_severity; +- + /* global variables for configuring filan */ + bool filan_followsymlinks; + bool filan_rawoutput; +Index: socat-1.7.3.3/procan.c +=================================================================== +--- socat-1.7.3.3.orig/procan.c ++++ socat-1.7.3.3/procan.c +@@ -16,6 +16,9 @@ + #include "filan.h" + + #include ++#ifdef WITH_LIBWRAP ++#include ++#endif + + #include "procan.h" + +Index: socat-1.7.3.3/xio-tcpwrap.c +=================================================================== +--- socat-1.7.3.3.orig/xio-tcpwrap.c ++++ socat-1.7.3.3/xio-tcpwrap.c +@@ -13,6 +13,7 @@ + #include "xio-tcpwrap.h" + + ++ + #if (WITH_TCP || WITH_UDP) && WITH_LIBWRAP + + const struct optdesc opt_tcpwrappers = { "tcpwrappers", "tcpwrap", OPT_TCPWRAPPERS, GROUP_RANGE, PH_ACCEPT, TYPE_STRING_NULL, OFUNC_SPEC }; diff --git a/socat.changes b/socat.changes index 3b50555..2d72bf6 100644 --- a/socat.changes +++ b/socat.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 4 12:41:58 UTC 2020 - Marcus Meissner + +- socat-common-fixes.patch: include tcpd.h where needed to fix + -fno-common bsc#1160293 + ------------------------------------------------------------------- Sat Apr 6 13:34:11 UTC 2019 - Martin Hauke diff --git a/socat.spec b/socat.spec index a54e674..eaa88a7 100644 --- a/socat.spec +++ b/socat.spec @@ -1,7 +1,7 @@ # # spec file for package socat # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2010 Pascal Bleser # # All modifications and additions to the file contributed by third parties @@ -27,6 +27,7 @@ URL: http://www.dest-unreach.org/socat/ Source: http://www.dest-unreach.org/socat/download/%{name}-%{version}.tar.bz2 Source1: %{name}.changes Patch1: socat-ignore-tests-failure-boo1078346.patch +Patch2: socat-common-fixes.patch BuildRequires: iputils BuildRequires: net-tools BuildRequires: openssl-devel @@ -54,6 +55,7 @@ combination of two of these. %prep %setup -q %patch1 -p1 +%patch2 -p1 sed 's|#! %{_bindir}/env bash|#!%{_bindir}/bash|' -i proxyecho.sh readline.sh %build @@ -61,7 +63,7 @@ sed 's|#! %{_bindir}/env bash|#!%{_bindir}/bash|' -i proxyecho.sh readline.sh CL_DATE="$(awk -F " - " 'NR==2{print $1;}' %{SOURCE1})" test -n "$CL_DATE" export BUILD_DATE="$(LANG=C date --utc -d "${CL_DATE}" +"%{b} %{e} %{Y} %{T}")" -export CFLAGS="%{optflags} -fno-strict-aliasing -DHAVE_SSLv23_client_method -DHAVE_SSLv23_server_method" +export CFLAGS="%{optflags} -fno-strict-aliasing -DHAVE_SSLv23_client_method -DHAVE_SSLv23_server_method -fno-common" %configure make %{?_smp_mflags} all mkdir examples