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.
This commit is contained in:
parent
18c3f055e7
commit
02a7bbed39
|
@ -244,6 +244,7 @@ static int _xcb_open(const char *host, char *protocol, const int display)
|
||||||
char *file = NULL;
|
char *file = NULL;
|
||||||
int actual_filelen;
|
int actual_filelen;
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
if (protocol && strcmp("unix", protocol) == 0 && host && host[0] == '/') {
|
if (protocol && strcmp("unix", protocol) == 0 && host && host[0] == '/') {
|
||||||
/* Full path to socket provided, ignore everything else */
|
/* Full path to socket provided, ignore everything else */
|
||||||
filelen = strlen(host) + 1;
|
filelen = strlen(host) + 1;
|
||||||
|
@ -255,6 +256,7 @@ static int _xcb_open(const char *host, char *protocol, const int display)
|
||||||
memcpy(file, host, filelen);
|
memcpy(file, host, filelen);
|
||||||
actual_filelen = (int)(filelen - 1);
|
actual_filelen = (int)(filelen - 1);
|
||||||
} else {
|
} else {
|
||||||
|
#endif
|
||||||
/* If protocol or host is "unix", fall through to Unix socket code below */
|
/* If protocol or host is "unix", fall through to Unix socket code below */
|
||||||
if ((!protocol || (strcmp("unix",protocol) != 0)) &&
|
if ((!protocol || (strcmp("unix",protocol) != 0)) &&
|
||||||
(*host != '\0') && (strcmp("unix",host) != 0))
|
(*host != '\0') && (strcmp("unix",host) != 0))
|
||||||
|
|
Loading…
Reference in New Issue