Accepting request 769978 from home:msmeissn:branches:network:utilities

- socat-common-fixes.patch: include tcpd.h where needed to fix
  -fno-common bsc#1160293

OBS-URL: https://build.opensuse.org/request/show/769978
OBS-URL: https://build.opensuse.org/package/show/network:utilities/socat?expand=0&rev=52
This commit is contained in:
Marcus Meissner 2020-02-04 13:12:37 +00:00 committed by Git OBS Bridge
parent db75a966c0
commit 1ae699f4cb
3 changed files with 62 additions and 2 deletions

52
socat-common-fixes.patch Normal file
View File

@ -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 <tcpd.h>
+#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 <sys/resource.h>
+#ifdef WITH_LIBWRAP
+#include <tcpd.h>
+#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 };

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Feb 4 12:41:58 UTC 2020 - Marcus Meissner <meissner@suse.com>
- 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 <mardnh@gmx.de>

View File

@ -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 <pascal.bleser@opensuse.org>
#
# 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