qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vnc-tls: Fix compilation with newer versions of GNU-TLS
@ 2012-10-18  9:16 Andre Przywara
  2012-10-18  9:23 ` Gerd Hoffmann
  0 siblings, 1 reply; 3+ messages in thread
From: Andre Przywara @ 2012-10-18  9:16 UTC (permalink / raw)
  To: anthony; +Cc: Andre Przywara, Gerd Hoffmann, qemu-devel

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>
---
 ui/vnc-tls.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c
index a7f7d07..ba3827b 100644
--- a/ui/vnc-tls.c
+++ b/ui/vnc-tls.c
@@ -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;
-- 
1.7.12.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] vnc-tls: Fix compilation with newer versions of GNU-TLS
  2012-10-18  9:16 [Qemu-devel] [PATCH] vnc-tls: Fix compilation with newer versions of GNU-TLS Andre Przywara
@ 2012-10-18  9:23 ` Gerd Hoffmann
  2012-11-06  9:23   ` Dunrong Huang
  0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2012-10-18  9:23 UTC (permalink / raw)
  To: Andre Przywara; +Cc: qemu-devel, anthony

On 10/18/12 11:16, Andre Przywara wrote:
> 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.

Acked-by: Gerd Hoffmann <kraxel@redhat.com>

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] vnc-tls: Fix compilation with newer versions of GNU-TLS
  2012-10-18  9:23 ` Gerd Hoffmann
@ 2012-11-06  9:23   ` Dunrong Huang
  0 siblings, 0 replies; 3+ messages in thread
From: Dunrong Huang @ 2012-11-06  9:23 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: Andre Przywara, qemu-devel, anthony

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]

Can anyone applied this patch, I also got this build error after upgrade
gnutls to version 3.1.3.


2012/10/18 Gerd Hoffmann <kraxel@redhat.com>

> On 10/18/12 11:16, Andre Przywara wrote:
> > 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.
>
> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
>
> cheers,
>   Gerd
>
>


-- 
Best Regards,

Dunrong Huang

[-- Attachment #2: Type: text/html, Size: 1298 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-06  9:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18  9:16 [Qemu-devel] [PATCH] vnc-tls: Fix compilation with newer versions of GNU-TLS Andre Przywara
2012-10-18  9:23 ` Gerd Hoffmann
2012-11-06  9:23   ` Dunrong Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).