FreeBSD include patches

  • From: Marcus von Appen <mva@xxxxxxxxxxxx>
  • To: emelfm2 <emelfm2@xxxxxxxxxxxxx>
  • Date: Mon, 4 Jun 2007 12:58:59 +0200

Hi,

attached you'll find two patches, which fix up include issues on the
FreeBSD operating system. statfs.h does not exist on FreeBSD, instead
mount.h and param.h are used for the usage of the statfs functions.
The second one is used to fix the pthread includes.

Both were made against the 0.3.4 release.

Regards
Marcus
--- src/filesystem/e2_fs.c.orig Sat May  5 09:54:48 2007
+++ src/filesystem/e2_fs.c      Mon Jun  4 12:55:01 2007
@@ -40,7 +40,12 @@
 #include <langinfo.h>
 #include <pwd.h>
 #include <grp.h>
-#include <sys/statfs.h>
+#if defined(__FreeBSD__)
+# include <sys/param.h>
+# include <sys/mount.h>
+#else
+# include <statfs.h>
+#endif
 #ifndef MNT_LOCAL
 # include <sys/statvfs.h>
 #endif
--- src/e2_fileview.h.orig      Fri May  4 02:54:44 2007
+++ src/e2_fileview.h   Mon Jun  4 12:48:01 2007
@@ -21,6 +21,9 @@
 #ifndef E2_FILEVIEW_H
 #define E2_FILEVIEW_H
 
+#if defined(__FreeBSD__)
+#include <pthread.h>
+#endif
 #include "emelfm2.h"
 
 //type of "dir" in a pane

Other related posts: