Skip to content

Commit

Permalink
GUACAMOLE-1841: Windows fixes for socket-tcp.c.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuehlner committed Aug 19, 2024
1 parent fbe4308 commit 60921a2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/libguac/socket-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,22 @@
#include "guacamole/socket.h"

#include <errno.h>

#ifdef WINDOWS_BUILD
#include <winsock2.h>
#include <ws2tcpip.h>
#else
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#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;

Expand Down Expand Up @@ -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;

}
}

0 comments on commit 60921a2

Please sign in to comment.