Index: /trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp	(revision 85343)
+++ /trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp	(revision 85344)
@@ -59,11 +59,23 @@
 #include <sys/sockio.h>
 #include <sys/kern_event.h>
-#include <net/kpi_interface.h>
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 /* The 10.15 SDK has a slightly butchered API deprecation attempt. */
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wmacro-redefined"      /* Each header redefines __NKE_API_DEPRECATED. */
+# pragma clang diagnostic ignored "-Wmissing-declarations" /* Misplaced __NKE_API_DEPRECATED; in kpi_mbuf.h. */
+# include <sys/kpi_socket.h>
+# include <net/kpi_interface.h>
+# include <sys/kpi_mbuf.h>
+# include <net/kpi_interfacefilter.h>
+# pragma clang diagnostic pop
+#else /* < 10.15*/
+# include <sys/kpi_socket.h>
+# include <net/kpi_interface.h>
 RT_C_DECLS_BEGIN /* Buggy 10.4 headers, fixed in 10.5. */
-#include <sys/kpi_mbuf.h>
-#include <net/kpi_interfacefilter.h>
+# include <sys/kpi_mbuf.h>
+# include <net/kpi_interfacefilter.h>
 RT_C_DECLS_END
-
-#include <sys/kpi_socket.h>
+#endif /* < 10.15*/
+
+
 #include <net/if.h>
 #include <net/if_var.h>
@@ -1375,6 +1387,10 @@
     if (pThis->u.s.pSysSock != NULL)
     {
+        RT_GCC_NO_WARN_DEPRECATED_BEGIN
+
         sock_close(pThis->u.s.pSysSock);
         pThis->u.s.pSysSock = NULL;
+
+        RT_GCC_NO_WARN_DEPRECATED_END
     }
 
@@ -1406,5 +1422,18 @@
     errno_t error;
 
+    /** @todo Figure out how to replace the socket stuff we use to detect
+     *        addresses here as 10.5 deprecates it. */
+    RT_GCC_NO_WARN_DEPRECATED_BEGIN
+
     /** @todo reorg code to not have numerous returns with duplicate code... */
+    /** @todo reorg code to not have numerous returns with duplicate code... */
+    /** @todo reorg code to not have numerous returns with duplicate code... */
+    /** @todo reorg code to not have numerous returns with duplicate code... */
+    /** @todo reorg code to not have numerous returns with duplicate code... */
+    /** @todo reorg code to not have numerous returns with duplicate code... */
+    /** @todo reorg code to not have numerous returns with duplicate code... */
+    /** @todo reorg code to not have numerous returns with duplicate code... */
+    /** @todo reorg code to not have numerous returns with duplicate code... */
+
     error = sock_socket(PF_SYSTEM, SOCK_RAW, SYSPROTO_EVENT,
                         vboxNetFltDarwinSysSockUpcall, pThis,
@@ -1448,4 +1477,5 @@
         return rc;
     }
+    RT_GCC_NO_WARN_DEPRECATED_END
 
     ifnet_t pIfNet = pThis->u.s.pIfNet; /* already retained */
@@ -1527,6 +1557,5 @@
     if (RT_UNLIKELY(pSysSock != pThis->u.s.pSysSock))
     {
-        Log(("vboxNetFltDarwinSysSockUpcall: %p != %p?\n",
-             pSysSock, pThis->u.s.pSysSock));
+        Log(("vboxNetFltDarwinSysSockUpcall: %p != %p?\n", pSysSock, pThis->u.s.pSysSock));
         return;
     }
@@ -1541,5 +1570,7 @@
         size_t len = sizeof(struct kern_event_msg) - sizeof(u_int32_t) + sizeof(struct kev_in6_data);
 
+        RT_GCC_NO_WARN_DEPRECATED_BEGIN
         error = sock_receivembuf(pSysSock, NULL, &m, 0, &len);
+        RT_GCC_NO_WARN_DEPRECATED_END
         if (error != 0)
         {
@@ -1566,6 +1597,5 @@
             if (len - (sizeof(struct kern_event_msg) - sizeof(u_int32_t)) < sizeof(struct kev_in_data))
             {
-                Log(("vboxNetFltDarwinSysSockUpcall: %u bytes is too short for KEV_INET_SUBCLASS\n",
-                     (unsigned int)len));
+                Log(("vboxNetFltDarwinSysSockUpcall: %u bytes is too short for KEV_INET_SUBCLASS\n", (unsigned int)len));
                 mbuf_freem(m);
                 return;
@@ -1613,5 +1643,5 @@
             {
                 Log(("vboxNetFltDarwinSysSockUpcall: %u bytes is too short for KEV_INET6_SUBCLASS\n",
-                        (unsigned int)len));
+                     (unsigned int)len));
                 mbuf_freem(m);
                 return;
@@ -1653,6 +1683,5 @@
 
                 kev_inet6_new:
-                    pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort,
-                        /* :fAdded */ true, kIntNetAddrType_IPv6, pAddr);
+                    pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort, true /*fAdded*/, kIntNetAddrType_IPv6, pAddr);
                     break;
 
@@ -1661,6 +1690,5 @@
                          IFNAMSIZ, link->if_name, link->if_unit, pAddr));
 
-                    pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort,
-                        /* :fAdded */ false, kIntNetAddrType_IPv6, pAddr);
+                    pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort, false /*fAdded*/, kIntNetAddrType_IPv6, pAddr);
                     break;
 
Index: /trunk/src/VBox/HostDrivers/darwin/VBoxNetSend.h
===================================================================
--- /trunk/src/VBox/HostDrivers/darwin/VBoxNetSend.h	(revision 85343)
+++ /trunk/src/VBox/HostDrivers/darwin/VBoxNetSend.h	(revision 85344)
@@ -40,9 +40,20 @@
 
 # include <sys/socket.h>
-# include <net/kpi_interface.h>
+# if MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 /* The 10.15 SDK has a slightly butchered API deprecation attempt. */
+#  pragma clang diagnostic push
+#  pragma clang diagnostic ignored "-Wmacro-redefined"      /* Each header redefines __NKE_API_DEPRECATED. */
+#  pragma clang diagnostic ignored "-Wmissing-declarations" /* Misplaced __NKE_API_DEPRECATED; in kpi_mbuf.h. */
+#  include <net/kpi_interface.h>
+#  include <sys/kpi_mbuf.h>
+#  include <net/if.h>
+#  pragma clang diagnostic pop
+# else /* < 10.15 */
+#  include <net/kpi_interface.h>
 RT_C_DECLS_BEGIN /* Buggy 10.4 headers, fixed in 10.5. */
-# include <sys/kpi_mbuf.h>
+#  include <sys/kpi_mbuf.h>
 RT_C_DECLS_END
-# include <net/if.h>
+#  include <net/if.h>
+# endif /* < 10.15 */
+
 
 RT_C_DECLS_BEGIN
