diff --git a/src/inet/InetInterface.cpp b/src/inet/InetInterface.cpp index ad186aec1dbf6a..af89de8cb96822 100644 --- a/src/inet/InetInterface.cpp +++ b/src/inet/InetInterface.cpp @@ -505,7 +505,7 @@ int GetIOCTLSocket() #endif { s = socket(AF_INET, SOCK_STREAM, 0); - fcntl(s, O_CLOEXEC); + fcntl(s, F_SETFD, O_CLOEXEC); } if (!__sync_bool_compare_and_swap(&sIOCTLSocket, -1, s))