summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Williams <peter@newton.cx>2023-08-24 21:50:29 -0400
committerPeter Williams <peter@newton.cx>2023-08-28 18:01:39 +0000
commit02a7bbed391859c79864b9aacf040d84f103d38a (patch)
tree71297060be2bef614994c815040114490cd0035a
parent18c3f055e7c02db6f15ae56f6995639635d1b055 (diff)
Fix compilation on Windows
Merge request !30 broke compilation on Windows by introducing unbalanced curly braces. This change restores the previous behavior on Windows: only TCP is supported.
-rw-r--r--src/xcb_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xcb_util.c b/src/xcb_util.c
index 5b1f495..eb21653 100644
--- a/src/xcb_util.c
+++ b/src/xcb_util.c
@@ -244,6 +244,7 @@ static int _xcb_open(const char *host, char *protocol, const int display)
char *file = NULL;
int actual_filelen;
+#ifndef _WIN32
if (protocol && strcmp("unix", protocol) == 0 && host && host[0] == '/') {
/* Full path to socket provided, ignore everything else */
filelen = strlen(host) + 1;
@@ -255,6 +256,7 @@ static int _xcb_open(const char *host, char *protocol, const int display)
memcpy(file, host, filelen);
actual_filelen = (int)(filelen - 1);
} else {
+#endif
/* If protocol or host is "unix", fall through to Unix socket code below */
if ((!protocol || (strcmp("unix",protocol) != 0)) &&
(*host != '\0') && (strcmp("unix",host) != 0))