--- nxdesktop/configure.orig	Mon Sep 18 03:22:22 2006
+++ nxdesktop/configure
@@ -405,7 +405,7 @@
   HP-UX)
     cflags="$cflags -D_XOPEN_SOURCE_EXTENDED"
     ;;
-  Linux)
+  Linux|FreeBSD)
     cflags="$cflags -DHAVE_DECL_DIRFD=1"
     ;;
 esac
