[Spice-devel] [PATCH spice-gtk] Fix build for newer LibreSSL

Christophe Fergeau cfergeau at redhat.com
Tue Jun 26 12:36:31 UTC 2018


On Thu, Jun 21, 2018 at 06:54:00AM +0100, Frediano Ziglio wrote:
> LibreSSL 2.7 hidden some definition, like OpenSSL 1.1.
> This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229044.
> Original patch from Piotr Kubaj.
> 
> Reported-by: Jack L. <xxjack12xx at gmail.com>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  src/bio-gio.c       | 3 ++-
>  src/spice-channel.c | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/bio-gio.c b/src/bio-gio.c
> index 30aa73bf..79ce7f8a 100644
> --- a/src/bio-gio.c
> +++ b/src/bio-gio.c
> @@ -23,7 +23,8 @@
>  #include "spice-util.h"
>  #include "bio-gio.h"
>  
> -#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
> +#if OPENSSL_VERSION_NUMBER < 0x10100000 || \
> +    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000)

An alternative to this version checking would be to directly check for
the function we need in configure.ac. This should be good enough for
now, I'll look into that when we need to update that test again.

Acked-by: Christophe Fergeau <cfergeau at redhat.com>

Christophe

>  static BIO_METHOD one_static_bio;
>  
>  static int BIO_meth_set_read(BIO_METHOD *biom,
> diff --git a/src/spice-channel.c b/src/spice-channel.c
> index 7d4464fc..7fe532ce 100644
> --- a/src/spice-channel.c
> +++ b/src/spice-channel.c
> @@ -55,7 +55,8 @@ static void spice_channel_reset_capabilities(SpiceChannel *channel);
>  static void spice_channel_send_migration_handshake(SpiceChannel *channel);
>  static gboolean channel_connect(SpiceChannel *channel, gboolean tls);
>  
> -#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
> +#if OPENSSL_VERSION_NUMBER < 0x10100000 || \
> +    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000)
>  static RSA *EVP_PKEY_get0_RSA(EVP_PKEY *pkey)
>  {
>      if (pkey->type != EVP_PKEY_RSA) {
> -- 
> 2.17.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180626/2ae154c8/attachment.sig>


More information about the Spice-devel mailing list