mirror of
https://gitlab.freedesktop.org/xorg/lib/libxcb.git
synced 2026-05-09 05:58:25 +02:00
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
1 changed files with 2 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue