--- a/src/ptlib/unix/socket.cxx
+++ b/src/ptlib/unix/socket.cxx
@@ -1167,6 +1167,10 @@
 #if defined(P_NETBSD) || defined(P_QNX)
         && (~rtm->rtm_flags&RTF_CLONED)     // Net BSD has flag one way
 #elif !defined(P_OPENBSD)
+#ifndef RTF_WASCLONED
+/* This macro was removed with FreeBSD 8.0 (arp-v2 rewrite). */
+#define RTF_WASCLONED 0x20000
+#endif
         && (~rtm->rtm_flags&RTF_WASCLONED)  // Free BSD/MAC has it another
 #else
                                             // Open BSD does not have it at all!
