|
|
92baa4 |
From ca7b1cd659eb0eb0ef355e3e122742abcea73287 Mon Sep 17 00:00:00 2001
|
|
|
92baa4 |
From: Kamil Dudka <kdudka@redhat.com>
|
|
|
92baa4 |
Date: Wed, 2 Jul 2014 16:34:48 +0200
|
|
|
92baa4 |
Subject: [PATCH 1/2] tool: call PR_Cleanup() on exit if NSPR is used
|
|
|
92baa4 |
|
|
|
92baa4 |
This prevents valgrind from reporting possibly lost memory that NSPR
|
|
|
92baa4 |
uses for file descriptor cache and other globally allocated internal
|
|
|
92baa4 |
data structures.
|
|
|
92baa4 |
|
|
|
92baa4 |
Upstream-commit: 24c3cdce88f39731506c287cb276e8bf4a1ce393
|
|
|
92baa4 |
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
|
92baa4 |
---
|
|
|
92baa4 |
src/tool_main.c | 10 ++++++++++
|
|
|
92baa4 |
1 file changed, 10 insertions(+)
|
|
|
92baa4 |
|
|
|
92baa4 |
diff --git a/src/tool_main.c b/src/tool_main.c
|
|
|
92baa4 |
index 95e9cc7..6a1ed6c 100644
|
|
|
92baa4 |
--- a/src/tool_main.c
|
|
|
92baa4 |
+++ b/src/tool_main.c
|
|
|
92baa4 |
@@ -27,6 +27,10 @@
|
|
|
92baa4 |
#include <signal.h>
|
|
|
92baa4 |
#endif
|
|
|
92baa4 |
|
|
|
92baa4 |
+#ifdef USE_NSS
|
|
|
92baa4 |
+#include <nspr.h>
|
|
|
92baa4 |
+#endif
|
|
|
92baa4 |
+
|
|
|
92baa4 |
#define ENABLE_CURLX_PRINTF
|
|
|
92baa4 |
/* use our own printf() functions */
|
|
|
92baa4 |
#include "curlx.h"
|
|
|
92baa4 |
@@ -104,6 +108,12 @@ int main(int argc, char *argv[])
|
|
|
92baa4 |
tool_pressanykey();
|
|
|
92baa4 |
#endif
|
|
|
92baa4 |
|
|
|
92baa4 |
+#ifdef USE_NSS
|
|
|
92baa4 |
+ if(PR_Initialized())
|
|
|
92baa4 |
+ /* prevent valgrind from reporting possibly lost memory (fd cache, ...) */
|
|
|
92baa4 |
+ PR_Cleanup();
|
|
|
92baa4 |
+#endif
|
|
|
92baa4 |
+
|
|
|
92baa4 |
free_config_fields(&config);
|
|
|
92baa4 |
|
|
|
92baa4 |
#ifdef __NOVELL_LIBC__
|
|
|
92baa4 |
--
|
|
|
92baa4 |
2.1.0
|
|
|
92baa4 |
|
|
|
92baa4 |
|
|
|
92baa4 |
From 295471f8122cf6522c36f8e3588e5b4d15a691ea Mon Sep 17 00:00:00 2001
|
|
|
92baa4 |
From: Alessandro Ghedini <alessandro@ghedini.me>
|
|
|
92baa4 |
Date: Thu, 17 Jul 2014 14:37:28 +0200
|
|
|
92baa4 |
Subject: [PATCH 2/2] build: link curl to NSS libraries when NSS support is
|
|
|
92baa4 |
enabled
|
|
|
92baa4 |
|
|
|
92baa4 |
This fixes a build failure on Debian caused by commit
|
|
|
92baa4 |
24c3cdce88f39731506c287cb276e8bf4a1ce393.
|
|
|
92baa4 |
|
|
|
92baa4 |
Bug: http://curl.haxx.se/mail/lib-2014-07/0209.html
|
|
|
92baa4 |
|
|
|
92baa4 |
Upstream-commit: c6e7cbb94e669b85d3eb8e015ec51d0072112133
|
|
|
92baa4 |
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
|
92baa4 |
---
|
|
|
92baa4 |
configure | 5 ++++-
|
|
|
92baa4 |
configure.ac | 4 ++++
|
|
|
92baa4 |
src/Makefile.am | 2 +-
|
|
|
92baa4 |
src/Makefile.in | 3 ++-
|
|
|
92baa4 |
4 files changed, 11 insertions(+), 3 deletions(-)
|
|
|
92baa4 |
|
|
|
92baa4 |
diff --git a/configure b/configure
|
|
|
92baa4 |
index 8741e21..c5d1817 100755
|
|
|
92baa4 |
--- a/configure
|
|
|
92baa4 |
+++ b/configure
|
|
|
92baa4 |
@@ -913,7 +913,7 @@ LIBMETALINK_LIBS
|
|
|
92baa4 |
CURL_CA_BUNDLE
|
|
|
92baa4 |
SSL_ENABLED
|
|
|
92baa4 |
USE_AXTLS
|
|
|
92baa4 |
-HAVE_NSS_INITCONTEXT
|
|
|
92baa4 |
+NSS_LIBS
|
|
|
92baa4 |
USE_NSS
|
|
|
92baa4 |
USE_CYASSL
|
|
|
92baa4 |
USE_POLARSSL
|
|
|
92baa4 |
@@ -23697,6 +23697,9 @@ fi
|
|
|
92baa4 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: detected NSS version $version" >&5
|
|
|
92baa4 |
$as_echo "$as_me: detected NSS version $version" >&6;}
|
|
|
92baa4 |
|
|
|
92baa4 |
+ NSS_LIBS=$addlib
|
|
|
92baa4 |
+
|
|
|
92baa4 |
+
|
|
|
92baa4 |
if test "x$cross_compiling" != "xyes"; then
|
|
|
92baa4 |
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
|
|
|
92baa4 |
export LD_LIBRARY_PATH
|
|
|
92baa4 |
diff --git a/configure.ac b/configure.ac
|
|
|
92baa4 |
index 70ef0b7..60a6b58 100644
|
|
|
92baa4 |
--- a/configure.ac
|
|
|
92baa4 |
+++ b/configure.ac
|
|
|
92baa4 |
@@ -2211,6 +2211,10 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
|
|
|
92baa4 |
if test "x$USE_NSS" = "xyes"; then
|
|
|
92baa4 |
AC_MSG_NOTICE([detected NSS version $version])
|
|
|
92baa4 |
|
|
|
92baa4 |
+ dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS
|
|
|
92baa4 |
+ NSS_LIBS=$addlib
|
|
|
92baa4 |
+ AC_SUBST([NSS_LIBS])
|
|
|
92baa4 |
+
|
|
|
92baa4 |
dnl when shared libs were found in a path that the run-time
|
|
|
92baa4 |
dnl linker doesn't search through, we need to add it to
|
|
|
92baa4 |
dnl LD_LIBRARY_PATH to prevent further configure tests to fail
|
|
|
92baa4 |
diff --git a/src/Makefile.am b/src/Makefile.am
|
|
|
92baa4 |
index af5a488..6863078 100644
|
|
|
92baa4 |
--- a/src/Makefile.am
|
|
|
92baa4 |
+++ b/src/Makefile.am
|
|
|
92baa4 |
@@ -60,7 +60,7 @@ LIBS = $(BLANK_AT_MAKETIME)
|
|
|
92baa4 |
if USE_EXPLICIT_LIB_DEPS
|
|
|
92baa4 |
curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@
|
|
|
92baa4 |
else
|
|
|
92baa4 |
-curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
|
|
|
92baa4 |
+curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
|
|
|
92baa4 |
endif
|
|
|
92baa4 |
|
|
|
92baa4 |
curl_LDFLAGS = @LIBMETALINK_LDFLAGS@
|
|
|
92baa4 |
diff --git a/src/Makefile.in b/src/Makefile.in
|
|
|
92baa4 |
index 41fb549..1b578c2 100644
|
|
|
92baa4 |
--- a/src/Makefile.in
|
|
|
92baa4 |
+++ b/src/Makefile.in
|
|
|
92baa4 |
@@ -231,6 +231,7 @@ NMEDIT = @NMEDIT@
|
|
|
92baa4 |
# Use the C locale to ensure that only ASCII characters appear in the
|
|
|
92baa4 |
# embedded text.
|
|
|
92baa4 |
NROFF = env LC_ALL=C @NROFF@ @MANOPT@ # figured out by the configure script
|
|
|
92baa4 |
+NSS_LIBS = @NSS_LIBS@
|
|
|
92baa4 |
OBJDUMP = @OBJDUMP@
|
|
|
92baa4 |
OBJEXT = @OBJEXT@
|
|
|
92baa4 |
OTOOL = @OTOOL@
|
|
|
92baa4 |
@@ -463,7 +464,7 @@ CURL_HFILES = \
|
|
|
92baa4 |
tool_xattr.h
|
|
|
92baa4 |
|
|
|
92baa4 |
curl_SOURCES = $(CURL_CFILES) $(CURLX_ONES) $(CURL_HFILES)
|
|
|
92baa4 |
-@USE_EXPLICIT_LIB_DEPS_FALSE@curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
|
|
|
92baa4 |
+@USE_EXPLICIT_LIB_DEPS_FALSE@curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
|
|
|
92baa4 |
@USE_EXPLICIT_LIB_DEPS_TRUE@curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@
|
|
|
92baa4 |
curl_LDFLAGS = @LIBMETALINK_LDFLAGS@
|
|
|
92baa4 |
curl_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
|
|
|
92baa4 |
--
|
|
|
92baa4 |
2.1.0
|
|
|
92baa4 |
|