Commit fbc0beb5 authored by Ferenc Wágner's avatar Ferenc Wágner
Browse files

New patch socket-and-gethostbyname-are-often-provided-by-libc.patch

socket() and gethostbyname() are often provided by libc

This stops overlinking against libnsl, so we don't need the --as-needed
linker option anymore.
parent 04c8101d
......@@ -3,3 +3,4 @@ Don-t-leak-the-build-flags-into-the-pkg-config-file.patch
Fix-Doxygen-formatting-issues.patch
Remove-obsolete-MAX_DOT_GRAPH_-WIDTH-HEIGHT-Doxygen-.patch
Drop-superfluous-scope-to-help-Doxygen-find-the-decl.patch
socket-and-gethostbyname-are-often-provided-by-libc.patch
From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@niif.hu>
Date: Mon, 4 Jul 2016 08:07:36 +0200
Subject: socket() and gethostbyname() are often provided by libc
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5968628..572bc3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,8 +102,8 @@ AC_CHECK_FUNCS([syslog gettimeofday ftime localtime_r gmtime_r])
# ----------------------------------------------------------------------------
# for RemoteSyslogAppender
-AC_CHECK_LIB(socket,socket, LIBS="-lsocket $LIBS",,)
-AC_CHECK_LIB(nsl,gethostbyname, LIBS="-lnsl $LIBS",,)
+AC_SEARCH_LIBS([socket],[socket],,[AC_MSG_ERROR([cannot find socket() function])])
+AC_SEARCH_LIBS([gethostbyname],[nsl],,[AC_MSG_ERROR([cannot find gethostbyname() function])])
# checks for pthreads
AX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
......@@ -4,9 +4,8 @@
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Force linking with -lpthread, working around a bug in libtool that drops
# the linkage because it uses -nostdlib. See #468555. Add --as-needed to
# drop a few unnecessary dependencies.
export DEB_LDFLAGS_MAINT_APPEND = -lpthread -Wl,--as-needed
# the linkage because it uses -nostdlib. See #468555.
export DEB_LDFLAGS_MAINT_APPEND = -lpthread
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
DEBUG = --enable-debug
......@@ -36,8 +35,5 @@ override_dh_install:
if [ -d $(APIDOCS) ]; then find $(APIDOCS) -name "*.md5" -delete; fi
dh_install --fail-missing
override_dh_autoreconf:
dh_autoreconf --as-needed
%:
dh $@ --parallel --with autoreconf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment