From 5fc861594c8253ba0e9045a4fca5d9b4bc69cecc Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 2 Dec 2013 17:07:32 +0100 Subject: [PATCH] tool_metalink: do not use HAVE_NSS_INITCONTEXT ... no longer provided by the configure script [upstream commit ff9b66a8d4abb2fd92b12ae8ae3e4e7f39856af7] --- 0004-curl-7.33.0-7fc9325a.patch | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/0004-curl-7.33.0-7fc9325a.patch b/0004-curl-7.33.0-7fc9325a.patch index b78f189..70c1c57 100644 --- a/0004-curl-7.33.0-7fc9325a.patch +++ b/0004-curl-7.33.0-7fc9325a.patch @@ -1120,3 +1120,59 @@ index d6b95b7..7da6a3b 100644 -- 1.7.1 + +From a3592df2afa075a2c905638c2d8d3513810eff09 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Mon, 2 Dec 2013 17:00:35 +0100 +Subject: [PATCH 10/10] tool_metalink: do not use HAVE_NSS_INITCONTEXT + +... no longer provided by the configure script + +[upstream commit ff9b66a8d4abb2fd92b12ae8ae3e4e7f39856af7] +--- + src/tool_metalink.c | 8 ++------ + 1 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/src/tool_metalink.c b/src/tool_metalink.c +index be5fc26..050f59d 100644 +--- a/src/tool_metalink.c ++++ b/src/tool_metalink.c +@@ -54,9 +54,7 @@ + # define MD5_CTX void * + # define SHA_CTX void * + # define SHA256_CTX void * +-# ifdef HAVE_NSS_INITCONTEXT +- static NSSInitContext *nss_context; +-# endif ++ static NSSInitContext *nss_context; + #elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \ + (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)) || \ + (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \ +@@ -240,7 +238,6 @@ static int nss_hash_init(void **pctx, SECOidTag hash_alg) + PK11Context *ctx; + + /* we have to initialize NSS if not initialized alraedy */ +-#ifdef HAVE_NSS_INITCONTEXT + if(!NSS_IsInitialized() && !nss_context) { + static NSSInitParameters params; + params.length = sizeof params; +@@ -248,7 +245,6 @@ static int nss_hash_init(void **pctx, SECOidTag hash_alg) + | NSS_INIT_NOCERTDB | NSS_INIT_NOMODDB | NSS_INIT_FORCEOPEN + | NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE | NSS_INIT_PK11RELOAD); + } +-#endif + + ctx = PK11_CreateDigestContext(hash_alg); + if(!ctx) +@@ -894,7 +890,7 @@ void clean_metalink(struct Configurable *config) + + void metalink_cleanup(void) + { +-#if defined(USE_NSS) && defined(HAVE_NSS_INITCONTEXT) ++#ifdef USE_NSS + if(nss_context) { + NSS_ShutdownContext(nss_context); + nss_context = NULL; +-- +1.7.1 +