summaryrefslogtreecommitdiffstats
path: root/package/netsnmp/0004-configure-fix-AC_CHECK_FUNCS-TLS_method-TLSv1_method.patch
blob: a731f25761e46dab0c748bc159f85f62c313eb25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 1ab6e3fc3cf61fa5a7b7363e59095e868474524b Mon Sep 17 00:00:00 2001
From: Giulio Benetti <giulio.benetti@micronovasrl.com>
Date: Mon, 15 Oct 2018 19:34:26 +0200
Subject: [PATCH 2/2] configure: fix AC_CHECK_FUNCS(TLS_method TLSv1_method
 ...) failure on static linking

If building as static lib, AC_CHECK_FUNCS(TLS_method TLSv1_method ...)
fails due to missing -lz in $LIBS.
At the moment, $LIBS contains "-lssl $LIBCRYPTO" only discarding
previous $LIBS content.

Add $LIBS to:
LIBS="-lssl $LIBCRYPTO"
as:
LIBS="-lssl $LIBCRYPTO $LIBS"
This way $LIBS will contain -lz at the end of linking command that in
static linking build is mandatory.

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
 configure.d/config_os_libs2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.d/config_os_libs2 b/configure.d/config_os_libs2
index 93044000b..c811c63ec 100644
--- a/configure.d/config_os_libs2
+++ b/configure.d/config_os_libs2
@@ -349,7 +349,7 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then
             LIBS="$netsnmp_save_LIBS"
         fi
         netsnmp_save_LIBS="$LIBS"
-        LIBS="-lssl $LIBCRYPTO"
+        LIBS="-lssl $LIBCRYPTO $LIBS"
         AC_CHECK_FUNCS([TLS_method TLSv1_method DTLS_method DTLSv1_method]dnl
                        [SSL_library_init SSL_load_error_strings])
         LIBS="$netsnmp_save_LIBS"
-- 
2.17.1

OpenPOWER on IntegriCloud