From 6ea30f9fb2bd9780dd67413283a2cbfef1c4f558 Mon Sep 17 00:00:00 2001 From: Sitsofe Wheeler Date: Sat, 30 Jan 2016 08:12:28 +0000 Subject: [PATCH] socket: Simplify SOL_TCP check Rather than checking for the names of OSes that don't implement it just check whether the define is available directly. --- lib/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/socket.c b/lib/socket.c index fb64261..7b93fec 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -140,7 +140,7 @@ static int set_tcp_sockopt(int sockfd, int optname, int value) { int level; - #if defined(__FreeBSD__) || defined(__sun) || (defined(__APPLE__) && defined(__MACH__)) + #ifndef SOL_TCP struct protoent *buf; if ((buf = getprotobyname("tcp")) != NULL)