From 8363ef2764fe9c6877d1cb21d3ce7b6cf869f00d Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Fri, 20 Mar 2015 14:06:49 +0000 Subject: [PATCH 1/5] os/xdmcp.c: Include Xtrans.h when building for WIN32 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Xtrans.h must be included on WIN32 to prototype _XSERVTransWSAStartup() xserver/os/xdmcp.c: In function ‘get_addr_by_name’: xserver/os/xdmcp.c:1483:5: error: implicit declaration of function ‘_XSERVTransWSAStartup’ [-Werror=implicit-function-declaration] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY --- os/xdmcp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/os/xdmcp.c b/os/xdmcp.c index bc5a70706..b265db338 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -19,6 +19,10 @@ #ifdef WIN32 #include +#define XSERV_t +#define TRANS_SERVER +#define TRANS_REOPEN +#include #endif #include From 5bf3e5c8326fb81655827dbd4c527f1a2ba09511 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Wed, 18 Mar 2015 13:29:22 +0000 Subject: [PATCH 2/5] hw/xwin/winclipboard: Link xwinclip with -lpthread Link xwinclip with -lpthread to fix build for MinGW Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- hw/xwin/winclipboard/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xwin/winclipboard/Makefile.am b/hw/xwin/winclipboard/Makefile.am index b1c95f4ef..a1079aec6 100644 --- a/hw/xwin/winclipboard/Makefile.am +++ b/hw/xwin/winclipboard/Makefile.am @@ -19,7 +19,7 @@ xwinclip_SOURCES = xwinclip.c debug.c xwinclip_CFLAGS = $(XWINMODULES_CFLAGS) -xwinclip_LDADD = libXWinclipboard.la $(XWINMODULES_LIBS) -lgdi32 +xwinclip_LDADD = libXWinclipboard.la $(XWINMODULES_LIBS) -lgdi32 -lpthread include $(top_srcdir)/manpages.am appman_PRE = xwinclip.man From 2b114d6a516ee584ff89b96b12acf91799b6d677 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Fri, 20 Mar 2015 14:29:58 +0000 Subject: [PATCH 3/5] hw/xnest: Fix build for MinGW Include the wrapped windows.h via X11/Xwindows.h before xcb_keysyms.h to avoid type clashes caused by the unwrapped windows.h that includes. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- hw/xnest/Keyboard.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/xnest/Keyboard.c b/hw/xnest/Keyboard.c index ee3f68e3f..ae8375ee3 100644 --- a/hw/xnest/Keyboard.c +++ b/hw/xnest/Keyboard.c @@ -16,6 +16,10 @@ is" without express or implied warranty. #include #endif +#ifdef WIN32 +#include +#endif + #include #include #include From a9b4b7b79682dd367ce26c29aa5dc85807201851 Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Fri, 20 Mar 2015 14:25:53 +0000 Subject: [PATCH 4/5] os/utils.c: Don't try to build os_move_fd() for WIN32 Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY --- os/utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os/utils.c b/os/utils.c index 75769f17c..74d73b305 100644 --- a/os/utils.c +++ b/os/utils.c @@ -2091,6 +2091,7 @@ FormatUInt64Hex(uint64_t num, char *string) string[len] = '\0'; } +#if !defined(WIN32) || defined(__CYGWIN__) /* Move a file descriptor out of the way of our select mask; this * is useful for file descriptors which will never appear in the * select mask to avoid reducing the number of clients that can @@ -2114,3 +2115,4 @@ os_move_fd(int fd) close(fd); return newfd; } +#endif From c7b49bdbb9321fe9a7dc35f47b91cac85516988f Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Fri, 20 Mar 2015 14:25:17 +0000 Subject: [PATCH 5/5] os/utils.c: Fix prototype for Win32TempDir() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit xorg/xserver/os/utils.c: In function ‘Win32TempDir’: xorg/xserver/os/utils.c:1643:1: warning: old-style function definition [-Wold-style-definition] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY --- os/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/utils.c b/os/utils.c index 74d73b305..61166970c 100644 --- a/os/utils.c +++ b/os/utils.c @@ -1640,7 +1640,7 @@ Fclose(void *iop) #include const char * -Win32TempDir() +Win32TempDir(void) { static char buffer[PATH_MAX];