$NetBSD: patch-as,v 1.2 2007/03/14 17:12:47 yyamano Exp $

--- include/ptlib/unix/ptlib/pmachdep.h.orig	2005-11-30 23:17:38.000000000 +1030
+++ include/ptlib/unix/ptlib/pmachdep.h	2007-09-01 13:54:10.000000000 +0930
@@ -235,7 +235,7 @@
 #endif
 
 ///////////////////////////////////////////////////////////////////////////////
-#elif defined(P_FREEBSD)
+#elif defined(P_FREEBSD) || defined(P_DRAGONFLY)
 
 #if defined(P_PTHREADS)
 #ifndef _THREAD_SAFE
@@ -259,7 +259,7 @@
 #include <netinet/tcp.h>
 
 /* socklen_t is defined in FreeBSD 3.4-STABLE, 4.0-RELEASE and above */
-#if (P_FREEBSD <= 340000)
+#if defined(P_FREEBSD) && (P_FREEBSD <= 340000)
 typedef int socklen_t;
 #endif
 
