]> granicus.if.org Git - pdns/commitdiff
Fix build against old PolarSSL versions
authorRemi Gacogne <rgacogne-github@coredump.fr>
Fri, 25 Dec 2015 15:29:26 +0000 (16:29 +0100)
committerRemi Gacogne <rgacogne-github@coredump.fr>
Fri, 25 Dec 2015 15:29:26 +0000 (16:29 +0100)
ctr_drbg_free() did not exist before PolarSSL 1.3.8

pdns/mbedtlscompat.hh

index e4601a7efcdc9f2581d83820bc44afbc95fbc271..cd66b8d5bfde6627604c88c2d2b0225446b82ba0 100644 (file)
@@ -78,7 +78,11 @@ typedef md_type_t mbedtls_md_type_t;
 #define mbedtls_ctr_drbg_init
 #define mbedtls_ctr_drbg_seed ctr_drbg_init
 #define mbedtls_ctr_drbg_random ctr_drbg_random
+#if POLARSSL_VERSION_NUMBER >= 0x01030800
 #define mbedtls_ctr_drbg_free ctr_drbg_free
+#else
+#define mbedtls_ctr_drbg_free
+#endif
 
 #define mbedtls_rsa_init rsa_init
 #define mbedtls_rsa_gen_key rsa_gen_key