9b982c2f4d
on libgcrypt. GnuTLS >= 2.12 does not depend on libgcrypt any longer. * Don't add filename defines to CPPFLAGS; there are quoting problems and gcc4 ends up warning, gcc3 aborts. Move the setting to Makefile.in. * The database subpackages shouldn't depend on the exact REVISION of the main package.
39 lines
1008 B
Plaintext
39 lines
1008 B
Plaintext
$OpenBSD: patch-runtime_nsd_gtls_c,v 1.1 2011/09/14 21:25:39 naddy Exp $
|
|
|
|
GnuTLS >= 2.12 does not depend on libgcrypt initialization any longer
|
|
and may in fact not use libgcrypt at all.
|
|
|
|
--- runtime/nsd_gtls.c.orig Wed Sep 14 03:05:03 2011
|
|
+++ runtime/nsd_gtls.c Wed Sep 14 03:06:21 2011
|
|
@@ -29,7 +29,9 @@
|
|
#include <string.h>
|
|
#include <gnutls/gnutls.h>
|
|
#include <gnutls/x509.h>
|
|
+#if GNUTLS_VERSION_NUMBER <= 0x020b00
|
|
#include <gcrypt.h>
|
|
+#endif
|
|
#include <errno.h>
|
|
#include <sys/stat.h>
|
|
#include <unistd.h>
|
|
@@ -53,7 +55,9 @@
|
|
#define CRLFILE "crl.pem"
|
|
|
|
|
|
+#if GNUTLS_VERSION_NUMBER <= 0x020b00
|
|
GCRY_THREAD_OPTION_PTHREAD_IMPL;
|
|
+#endif
|
|
MODULE_TYPE_LIB
|
|
|
|
/* static data */
|
|
@@ -559,8 +563,10 @@ gtlsGlblInit(void)
|
|
uchar *cafile;
|
|
DEFiRet;
|
|
|
|
+#if GNUTLS_VERSION_NUMBER <= 0x020b00
|
|
/* gcry_control must be called first, so that the thread system is correctly set up */
|
|
gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
|
|
+#endif
|
|
CHKgnutls(gnutls_global_init());
|
|
|
|
/* X509 stuff */
|