From 38aaf904c7f0feda58a1c321af6042ab29ee7716 Mon Sep 17 00:00:00 2001 From: Chris Zheng Date: Wed, 3 Dec 2014 15:38:39 +0100 Subject: [PATCH] Fix gnutls.c build on MinGW Fixes: debbugs:19231 * gnutls.c (init_gnutls_functions, gnutls_certificate_details): Use gnutls_sign_get_name directly because gnutls_sign_algorithm_get_name is a macro on MinGW. (init_gnutls_functions): Load missing gnutls_server_name_set. --- src/ChangeLog | 7 +++++++ src/gnutls.c | 9 +++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7dc2b928f1e..a48788380f9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2014-12-03 Chris Zheng (tiny change) + + * gnutls.c (init_gnutls_functions, gnutls_certificate_details): + Use gnutls_sign_get_name directly because + gnutls_sign_algorithm_get_name is a macro on MinGW (bug#19231). + (init_gnutls_functions): Load missing gnutls_server_name_set. + 2014-12-02 Eli Zaretskii * bidi.c (bidi_find_first_overridden): New function. diff --git a/src/gnutls.c b/src/gnutls.c index 752df3c8edd..7c61445de92 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -185,7 +185,7 @@ DEF_GNUTLS_FN (int, gnutls_x509_crt_get_key_id, (gnutls_x509_crt_t, unsigned int, unsigned char *, size_t *_size)); DEF_GNUTLS_FN (const char*, gnutls_sec_param_get_name, (gnutls_sec_param_t)); -DEF_GNUTLS_FN (const char*, gnutls_sign_algorithm_get_name, +DEF_GNUTLS_FN (const char*, gnutls_sign_get_name, (gnutls_sign_algorithm_t)); DEF_GNUTLS_FN (int, gnutls_server_name_set, (gnutls_session_t, gnutls_server_name_type_t, @@ -265,7 +265,8 @@ init_gnutls_functions (void) LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_signature); LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_key_id); LOAD_GNUTLS_FN (library, gnutls_sec_param_get_name); - LOAD_GNUTLS_FN (library, gnutls_sign_algorithm_get_name); + LOAD_GNUTLS_FN (library, gnutls_sign_get_name); + LOAD_GNUTLS_FN (library, gnutls_server_name_set); max_log_level = global_gnutls_log_level; @@ -337,7 +338,7 @@ init_gnutls_functions (void) #define fn_gnutls_x509_crt_get_signature gnutls_x509_crt_get_signature #define fn_gnutls_x509_crt_get_key_id gnutls_x509_crt_get_key_id #define fn_gnutls_sec_param_get_name gnutls_sec_param_get_name -#define fn_gnutls_sign_algorithm_get_name gnutls_sign_algorithm_get_name +#define fn_gnutls_sign_get_name gnutls_sign_get_name #define fn_gnutls_server_name_set gnutls_server_name_set #endif /* !WINDOWSNT */ @@ -928,7 +929,7 @@ gnutls_certificate_details (gnutls_x509_crt_t cert) err = fn_gnutls_x509_crt_get_signature_algorithm (cert); if (err >= GNUTLS_E_SUCCESS) { - const char *name = fn_gnutls_sign_algorithm_get_name (err); + const char *name = fn_gnutls_sign_get_name (err); if (name) res = nconc2 (res, list2 (intern (":signature-algorithm"), build_string (name))); -- 2.39.2