# HG changeset patch # User Sebastien Decugis # Date 1347389478 -7200 # Node ID 0eb64b3a36321b59dd61438dcb333a4e4ba78274 # Parent 448a96910f5b280f3ce7be2bd31db2f849dbe6ad Fix compilation with gnutls < 3.x diff -r 448a96910f5b -r 0eb64b3a3632 libfdcore/config.c --- a/libfdcore/config.c Sun Sep 09 21:34:21 2012 +0200 +++ b/libfdcore/config.c Tue Sep 11 20:51:18 2012 +0200 @@ -397,7 +397,13 @@ } CHECK_MALLOC( certs = calloc(cert_max, sizeof(gnutls_x509_crt_t)) ); - CHECK_GNUTLS_DO( gnutls_x509_crt_list_import(certs, &cert_max, &certfile, GNUTLS_X509_FMT_PEM, GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED), + CHECK_GNUTLS_DO( gnutls_x509_crt_list_import(certs, &cert_max, &certfile, GNUTLS_X509_FMT_PEM, + #ifdef GNUTLS_VERSION_300 + GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED + #else /* GNUTLS_VERSION_300 */ + 0 + #endif /* GNUTLS_VERSION_300 */ + ), { TRACE_DEBUG(INFO, "Failed to import the data from file '%s'", fd_g_config->cnf_sec_data.cert_file); free(certfile.data);