Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36739556 authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Fix Windows socket_network_client.c build failures.

Change-Id: Ie67a2305ade02e078bf0edf54104c295b091b1b7
parent 9cae50b3
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -68,6 +68,13 @@ int socket_network_client_timeout(const char *host, int port, int type, int time
    s = socket(hp->h_addrtype, type, 0);
    if (s < 0) return -1;

#ifdef HAVE_WINSOCK
    if (connect(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
        close(s);
        return -1;
    }
    return s;
#else
    if ((flags = fcntl(s, F_GETFL, 0)) < 0) {
        close(s);
        return -1;
@@ -125,5 +132,5 @@ done:
    }

    return s;
#endif
}