vnc-tls: Fix compilation with newer versions of GNU-TLS
In my installation of GNU-TLS (v3.0.23) the type gnutls_anon_server_credentials is marked deprecated, so -Werror breaks compilation. Simply replacing it with the newer ..._t version fixed the compilation on my machine (Slackware 14.0). I cannot tell how far back this "new" type goes, at least the header file in RHEL 5.0 (v1.4.1) seems to have it already. If someone finds a broken distribution, tell me and I insert some compat code. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Message-id: 1350551818-14717-1-git-send-email-andre.przywara@amd.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
10adb8be87
commit
7d2a929feb
@ -99,9 +99,9 @@ static ssize_t vnc_tls_pull(gnutls_transport_ptr_t transport,
|
||||
}
|
||||
|
||||
|
||||
static gnutls_anon_server_credentials vnc_tls_initialize_anon_cred(void)
|
||||
static gnutls_anon_server_credentials_t vnc_tls_initialize_anon_cred(void)
|
||||
{
|
||||
gnutls_anon_server_credentials anon_cred;
|
||||
gnutls_anon_server_credentials_t anon_cred;
|
||||
int ret;
|
||||
|
||||
if ((ret = gnutls_anon_allocate_server_credentials(&anon_cred)) < 0) {
|
||||
@ -382,7 +382,7 @@ int vnc_tls_client_setup(struct VncState *vs,
|
||||
}
|
||||
|
||||
} else {
|
||||
gnutls_anon_server_credentials anon_cred = vnc_tls_initialize_anon_cred();
|
||||
gnutls_anon_server_credentials_t anon_cred = vnc_tls_initialize_anon_cred();
|
||||
if (!anon_cred) {
|
||||
gnutls_deinit(vs->tls.session);
|
||||
vs->tls.session = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user