--- stat/stat.orig	2014-03-03 16:28:16 UTC
+++ stat/stat
@@ -6,6 +6,10 @@
 #include <unistd.h>
 #include <string>
 
+#if defined(__FreeBSD__) || defined(__DragonFly__)
+#include <cerrno>
+#endif
+
 #include <bobcat/datetime>
 #include <bobcat/gs>
 
