1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 17:47:09 +00:00

Proper handle missing statfs64

statfs64 ist atm linux specific; wrap statfs around it.

Also cleanup param.h and mount.h including: the assumption in fs.cc
that their presence is a sign of *BSDs is wrong, as they exist in
linux too with different meaning.

Besides presence of mount.h isn't detected in Conky.cmake, so
conditional including mount.h in fs.cc is useless. Is just works
because mount.h and param.h are included in freebsd.h and dragonfly.h
later on. They are unneded in linux.

Just remove conditional including of mount.h and param.h in fs.cc,
conditional wrap statfs64 in proper *BSD header files.
This commit is contained in:
Magliano Andrea 2012-07-05 11:27:45 +02:00 committed by Pavel Labath
parent 93af415ad7
commit abdb5582bd
4 changed files with 9 additions and 10 deletions

View File

@ -118,4 +118,9 @@
#cmakedefine BUILD_CMUS 1 #cmakedefine BUILD_CMUS 1
#cmakedefine HAVE_STATFS64 1
#ifndef HAVE_STATFS64
#define statfs64 statfs
#endif
#endif /* _conky_config_h_ */ #endif /* _conky_config_h_ */

View File

@ -26,6 +26,8 @@
* *
*/ */
#include "config.h"
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/resource.h> #include <sys/resource.h>

View File

@ -27,6 +27,8 @@
* *
*/ */
#include "config.h"
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/dkstat.h> #include <sys/dkstat.h>
#include <sys/param.h> #include <sys/param.h>

View File

@ -41,18 +41,8 @@
#ifdef HAVE_SYS_STATFS_H #ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h> #include <sys/statfs.h>
#ifndef HAVE_STATFS64
#define statfs64 statfs
#endif
#endif #endif
/* freebsd && netbsd */
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#if defined(__FreeBSD__) #if defined(__FreeBSD__)
#include "freebsd.h" #include "freebsd.h"
#elif defined(__DragonFly__) #elif defined(__DragonFly__)