commit 5e4efd6667d9417e781ef8508f7460b6211f5a7a
parent 3f37c43af50c88b70d34c386106eb93e0ca8e47e
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 23 Sep 2013 11:39:05 +0000
-need to initialize gcrypt for libcurl
Diffstat:
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/testcurl/Makefile.am b/src/testcurl/Makefile.am
@@ -186,7 +186,7 @@ test_postform_SOURCES = \
test_postform.c
test_postform_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@ @LIBGCRYPT_LIBS@
test_post_loop_SOURCES = \
test_post_loop.c
@@ -228,7 +228,7 @@ test_postform11_SOURCES = \
test_postform.c
test_postform11_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@ @LIBGCRYPT_LIBS@
test_post_loop11_SOURCES = \
test_post_loop.c
diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c
@@ -31,6 +31,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#include <gcrypt.h>
#ifndef WINDOWS
#include <unistd.h>
@@ -468,6 +469,11 @@ main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
+#ifdef GCRYCTL_INITIALIZATION_FINISHED
+ gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+#endif
oneone = NULL != strstr (argv[0], "11");
if (0 != curl_global_init (CURL_GLOBAL_WIN32))
return 2;