[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PULL 14/61] configure: Fix building with SASL on Windows

From: Paolo Bonzini
Subject: [PULL 14/61] configure: Fix building with SASL on Windows
Date: Mon, 16 Mar 2020 22:26:41 +0100

From: Philippe Mathieu-Daudé <address@hidden>

The Simple Authentication and Security Layer (SASL) library
re-defines the struct iovec on Win32 [*]. QEMU also re-defines
it in "qemu/osdep.h". The two definitions then clash on a MinGW
We can avoid the SASL definition by defining STRUCT_IOVEC_DEFINED.
Since QEMU already defines 'struct iovec' if it is missing, add
the definition to vnc_sasl_cflags to avoid SASL re-defining it.


Cc: Alexey Pavlov <address@hidden>
Cc: Biswapriyo Nath <address@hidden>
Reported-by: Youry Metlitsky <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
 configure | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index a7f2c3e..44a70cf 100755
--- a/configure
+++ b/configure
@@ -3367,7 +3367,9 @@ if test "$vnc" = "yes" && test "$vnc_sasl" != "no" ; then
 int main(void) { sasl_server_init(NULL, "qemu"); return 0; }
   # Assuming Cyrus-SASL installed in /usr prefix
-  vnc_sasl_cflags=""
+  # QEMU defines struct iovec in "qemu/osdep.h",
+  # we don't want libsasl to redefine it in <sasl/sasl.h>.
+  vnc_sasl_cflags="-DSTRUCT_IOVEC_DEFINED"
   if compile_prog "$vnc_sasl_cflags" "$vnc_sasl_libs" ; then

reply via email to

[Prev in Thread] Current Thread [Next in Thread]