aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-23 11:39:05 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-23 11:39:05 +0000
commit5e4efd6667d9417e781ef8508f7460b6211f5a7a (patch)
treed7efcbbc6075ef0b6f5631f50e9382a4d37a9bc7
parent3f37c43af50c88b70d34c386106eb93e0ca8e47e (diff)
downloadlibmicrohttpd-5e4efd6667d9417e781ef8508f7460b6211f5a7a.tar.gz
libmicrohttpd-5e4efd6667d9417e781ef8508f7460b6211f5a7a.zip
-need to initialize gcrypt for libcurl
-rw-r--r--src/testcurl/Makefile.am4
-rw-r--r--src/testcurl/test_postform.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/src/testcurl/Makefile.am b/src/testcurl/Makefile.am
index 8ad4bd5a..290e0c49 100644
--- a/src/testcurl/Makefile.am
+++ b/src/testcurl/Makefile.am
@@ -186,7 +186,7 @@ test_postform_SOURCES = \
186 test_postform.c 186 test_postform.c
187test_postform_LDADD = \ 187test_postform_LDADD = \
188 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 188 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
189 @LIBCURL@ 189 @LIBCURL@ @LIBGCRYPT_LIBS@
190 190
191test_post_loop_SOURCES = \ 191test_post_loop_SOURCES = \
192 test_post_loop.c 192 test_post_loop.c
@@ -228,7 +228,7 @@ test_postform11_SOURCES = \
228 test_postform.c 228 test_postform.c
229test_postform11_LDADD = \ 229test_postform11_LDADD = \
230 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 230 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
231 @LIBCURL@ 231 @LIBCURL@ @LIBGCRYPT_LIBS@
232 232
233test_post_loop11_SOURCES = \ 233test_post_loop11_SOURCES = \
234 test_post_loop.c 234 test_post_loop.c
diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c
index 3b63f840..d9bec6c6 100644
--- a/src/testcurl/test_postform.c
+++ b/src/testcurl/test_postform.c
@@ -31,6 +31,7 @@
31#include <stdlib.h> 31#include <stdlib.h>
32#include <string.h> 32#include <string.h>
33#include <time.h> 33#include <time.h>
34#include <gcrypt.h>
34 35
35#ifndef WINDOWS 36#ifndef WINDOWS
36#include <unistd.h> 37#include <unistd.h>
@@ -468,6 +469,11 @@ main (int argc, char *const *argv)
468{ 469{
469 unsigned int errorCount = 0; 470 unsigned int errorCount = 0;
470 471
472 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
473 gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
474#ifdef GCRYCTL_INITIALIZATION_FINISHED
475 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
476#endif
471 oneone = NULL != strstr (argv[0], "11"); 477 oneone = NULL != strstr (argv[0], "11");
472 if (0 != curl_global_init (CURL_GLOBAL_WIN32)) 478 if (0 != curl_global_init (CURL_GLOBAL_WIN32))
473 return 2; 479 return 2;