changeset 13229:52f20913a6c2

lib/gc-libgcrypt.c (gc_init): Use MIN_GCRYPT_VERSION set to version 1.4.4.
author Simon Josefsson <simon@josefsson.org>
date Wed, 14 Apr 2010 15:23:28 +0200
parents de461a3f23f5
children 073a6b804253
files ChangeLog lib/gc-libgcrypt.c
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-04-14  Simon Josefsson  <simon@josefsson.org>
+
+	* lib/gc-libgcrypt.c (gc_init): Use MIN_GCRYPT_VERSION set to
+	version 1.4.4 by default instead of requiring the libgcrypt
+	version used during build.  This makes it possible to use the
+	application with older but still binary compatible libgcrypt
+	versions.
+
 2010-04-13  Eric Blake  <eblake@redhat.com>
 
 	getopt-gnu: match recent glibc fixes and posix ruling
--- a/lib/gc-libgcrypt.c
+++ b/lib/gc-libgcrypt.c
@@ -37,6 +37,10 @@
 
 #include <assert.h>
 
+#ifndef MIN_GCRYPT_VERSION
+# define MIN_GCRYPT_VERSION "1.4.4"
+#endif
+
 /* Initialization. */
 
 Gc_rc
@@ -50,7 +54,7 @@
       if (gcry_control (GCRYCTL_DISABLE_SECMEM, NULL, 0))
         return GC_INIT_ERROR;
 
-      if (gcry_check_version (GCRYPT_VERSION) == NULL)
+      if (gcry_check_version (MIN_GCRYPT_VERSION) == NULL)
         return GC_INIT_ERROR;
 
       err = gcry_control (GCRYCTL_INITIALIZATION_FINISHED, NULL, 0);