here comes the big header include rewrite
[monky] / src / fs.c
index 650be32..dbdea8e 100644 (file)
--- a/src/fs.c
+++ b/src/fs.c
@@ -7,7 +7,7 @@
  * Please see COPYING for details
  *
  * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
- * Copyright (c) 2005-2007 Brenden Matthews, Philip Kovacs, et. al.
+ * Copyright (c) 2005-2008 Brenden Matthews, Philip Kovacs, et. al.
  *     (see AUTHORS)
  * All rights reserved.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
- * $Id$ */
+ */
 
 #include "conky.h"
+#include "logging.h"
+#include "fs.h"
 #include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
 #include <errno.h>
 #include <sys/types.h>
 #include <fcntl.h>
@@ -46,7 +46,7 @@
 #include <sys/mount.h>
 #endif
 
-#ifndef HAVE_STRUCT_STATFS_F_FSTYPENAME
+#if !defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) && !defined (__OpenBSD__) && !defined(__FreeBSD__)
 #include <mntent.h>
 #endif
 
@@ -126,7 +126,7 @@ static void update_fs_stat(struct fs_stat *fs)
 void get_fs_type(const char *path, char *result)
 {
 
-#ifdef HAVE_STRUCT_STATFS_F_FSTYPENAME
+#if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) || defined(__FreeBSD__) || defined (__OpenBSD__)
 
        struct statfs s;
        if (statfs(path, &s) == 0) {