[Spice-devel] [PATCH spice-server] red-stream: Fix compilation on Fedora 30 for Windows using MingW

Frediano Ziglio fziglio at redhat.com
Wed Jun 12 10:53:30 UTC 2019


On Windows Fedora 30 reports these errors:

In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/openssl/crypto.h:29,
                 from /usr/x86_64-w64-mingw32/sys-root/mingw/include/openssl/bio.h:20,
                 from /usr/x86_64-w64-mingw32/sys-root/mingw/include/openssl/err.h:21,
                 from red-stream.c:31:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/openssl/x509.h:75:1: error: pasting "stack_st_" and "(" does not give a valid preprocessing token
 DEFINE_STACK_OF(X509_NAME)
 ^~~~~~~~~~~~~~~
/usr/x86_64-w64-mingw32/sys-root/mingw/include/openssl/x509.h:75:17: error: expected ')' before numeric constant
 DEFINE_STACK_OF(X509_NAME)
                 ^~~~~~~~~
...

This is due to missing X509_NAME definition by Windows headers.
Incude missing header in order to make code compile again.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/red-stream.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/server/red-stream.c b/server/red-stream.c
index 3057d8bbb..77fed097e 100644
--- a/server/red-stream.c
+++ b/server/red-stream.c
@@ -24,6 +24,8 @@
 #include <netdb.h>
 #include <sys/socket.h>
 #include <netinet/tcp.h>
+#else
+#include <ws2tcpip.h>
 #endif
 
 #include <glib.h>
-- 
2.20.1



More information about the Spice-devel mailing list