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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user