@@ -393,11 +393,11 @@ port = freePort--; #endif results = of_resolve_host(host, port, SOCK_DGRAM); @try { -#if SOCK_CLOEXEC == 0 +#if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) int flags; #endif if ((_socket = socket(results[0]->family, results[0]->type | SOCK_CLOEXEC, @@ -404,11 +404,11 @@ results[0]->protocol)) == INVALID_SOCKET) @throw [OFBindFailedException exceptionWithHost: host port: port socket: self]; -#if SOCK_CLOEXEC == 0 +#if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) if ((flags = fcntl(_socket, F_GETFD, 0)) != -1) fcntl(_socket, F_SETFD, flags | FD_CLOEXEC); #endif if (bind(_socket, results[0]->address,