Commit 936511f6 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[1238] Compilation fix on non-Linux systems.

parent 5a2d9587
...@@ -323,13 +323,16 @@ IfaceMgr::openSocket4(Iface& iface, const IOAddress& addr, int port) { ...@@ -323,13 +323,16 @@ IfaceMgr::openSocket4(Iface& iface, const IOAddress& addr, int port) {
close(sock); close(sock);
isc_throw(Unexpected, "setsockopt: IP_RECVPKTINFO failed.") isc_throw(Unexpected, "setsockopt: IP_RECVPKTINFO failed.")
} }
#else #elif defined(IP_PKTINFO)
/* RFC2292 - an old way */ /* RFC2292 - an old way */
if (setsockopt(sock, IPPROTO_IP, IP_PKTINFO, if (setsockopt(sock, IPPROTO_IP, IP_PKTINFO,
&flag, sizeof(flag)) != 0) { &flag, sizeof(flag)) != 0) {
close(sock); close(sock);
isc_throw(Unexpected, "setsockopt: IP_PKTINFO: failed."); isc_throw(Unexpected, "setsockopt: IP_PKTINFO: failed.");
} }
#else
// "Neither IP_RECVPKTINFO nor IP_PKTINFO defined. Cannot continue"
flag = 1; // just to avoid compilation warnings about unused flag variable
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment