#include <string.h>
#ifdef _WIN32
-#include "windefs.h"
+#include "xcb_windefs.h"
#else
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <fcntl.h>
#include <netdb.h>
#endif /* _WIN32 */
fd = _xcb_open_abstract(protocol, file, filelen);
if (fd >= 0 || (errno != ENOENT && errno != ECONNREFUSED))
return fd;
-
#endif
return _xcb_open_unix(protocol, file);
#endif /* !_WIN32 */
+ return -1; /* if control reaches here then something has gone wrong */
}
static int _xcb_socket(int family, int type, int proto)