From 13e9915b4de13bafdd82faa2ff5d5305e2592c4f Mon Sep 17 00:00:00 2001 From: James Muehlner Date: Fri, 7 Jun 2024 23:06:06 +0000 Subject: [PATCH] GUACAMOLE-1841: Windows fixes for socket-tcp.c. --- src/libguac/socket-tcp.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/libguac/socket-tcp.c b/src/libguac/socket-tcp.c index 7e41d0218..3dee702e3 100644 --- a/src/libguac/socket-tcp.c +++ b/src/libguac/socket-tcp.c @@ -22,15 +22,22 @@ #include "guacamole/socket.h" #include + +#ifdef WINDOWS_BUILD +#include +#include +#else #include #include #include +#endif int guac_socket_tcp_connect(const char* hostname, const char* port) { int retval; - int fd = EBADFD; + int fd = -1; + struct addrinfo* addresses; struct addrinfo* current_address; @@ -99,4 +106,4 @@ int guac_socket_tcp_connect(const char* hostname, const char* port) { /* Return the fd, or the error message if the socket connection failed. */ return fd; -} \ No newline at end of file +}