summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Network.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-02-07 18:43:12 +0100
committerJose <jose@zeroc.com>2019-02-07 21:02:19 +0100
commit065e5f80067bf8ab72077039d5414d9383565a01 (patch)
tree1c6f0217cf1a9ea62ec8e31a51317de8e6bfc642 /cpp/src/Ice/Network.cpp
parentAmazon Linux is now amzn2 (diff)
downloadice-065e5f80067bf8ab72077039d5414d9383565a01.tar.bz2
ice-065e5f80067bf8ab72077039d5414d9383565a01.tar.xz
ice-065e5f80067bf8ab72077039d5414d9383565a01.zip
Fix macros for Linux OS detection
Diffstat (limited to 'cpp/src/Ice/Network.cpp')
-rwxr-xr-xcpp/src/Ice/Network.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index 9a865c664c7..19aac9ec2c4 100755
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -46,7 +46,7 @@
# include <sys/ioctl.h>
#endif
-#if defined(__linux) || defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
# include <ifaddrs.h>
#elif defined(__sun)
# include <sys/sockio.h>
@@ -346,7 +346,7 @@ getLocalAddresses(ProtocolSupport protocol, bool includeLoopback, bool singleAdd
free(adapter_addresses);
}
-#elif defined(__linux) || defined(__APPLE__) || defined(__FreeBSD__)
+#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
struct ifaddrs* ifap;
if(::getifaddrs(&ifap) == SOCKET_ERROR)
{
@@ -648,7 +648,7 @@ getInterfaceIndex(const string& intf)
//
if(isAddr)
{
-# if defined(__linux) || defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
struct ifaddrs* ifap;
if(::getifaddrs(&ifap) != SOCKET_ERROR)
{
@@ -2653,7 +2653,7 @@ repeatConnect:
}
}
-#if defined(__linux)
+#if defined(__linux__)
//
// Prevent self connect (self connect happens on Linux when a client tries to connect to
// a server which was just deactivated if the client socket re-uses the same ephemeral
@@ -2722,7 +2722,7 @@ IceInternal::doFinishConnect(SOCKET fd)
}
}
-#if defined(__linux)
+#if defined(__linux__)
//
// Prevent self connect (self connect happens on Linux when a client tries to connect to
// a server which was just deactivated if the client socket re-uses the same ephemeral