Browse Source

[1238] Compilation fix on non-Linux systems.

Tomek Mrugalski 13 years ago
parent
commit
936511f6e1
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/bin/dhcp6/iface_mgr.cc

+ 4 - 1
src/bin/dhcp6/iface_mgr.cc

@@ -323,13 +323,16 @@ IfaceMgr::openSocket4(Iface& iface, const IOAddress& addr, int port) {
         close(sock);
         isc_throw(Unexpected, "setsockopt: IP_RECVPKTINFO failed.")
     }
-#else
+#elif defined(IP_PKTINFO)
     /* RFC2292 - an old way */
     if (setsockopt(sock, IPPROTO_IP, IP_PKTINFO,
                    &flag, sizeof(flag)) != 0) {
         close(sock);
         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