Index: afio.c
--- afio.c.orig	2003-12-20 23:16:13.000000000 +0100
+++ afio.c	2003-12-22 08:19:35.000000000 +0100
@@ -160,18 +160,20 @@
 #include <stdio.h>
 #include <errno.h>
 
-#ifdef sun
+#if defined(sun) || defined(__FreeBSD__)
 #include <sys/types.h>
 #include <utime.h>
 #include <signal.h>
 #include <strings.h>
 #include <sys/wait.h>
+#if defined(sun)
 #define linux_tstamp 1
 /* fix SunOS errno.h not declaring what the manpage says it declares 
    bogosity. */
  extern int sys_nerr;
  extern char *sys_errlist[];
 #endif
+#endif
 
 #ifdef hpux
  /* Fix that HPUX dosent have sys_nerr or sys_errlist 
Index: compfile.c
--- compfile.c.orig	2003-06-24 23:32:20.000000000 +0200
+++ compfile.c	2003-12-22 08:17:13.000000000 +0100
@@ -210,7 +210,7 @@
  * version;
  */
 
-#if ( defined(sun) && defined(__svr4__) )
+#if ( defined(sun) && defined(__svr4__) ) || defined(__FreeBSD__)
 #include <dirent.h>
 #else
 #include <sys/dir.h>
