mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 04:17:33 +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:
parent
93af415ad7
commit
abdb5582bd
@ -118,4 +118,9 @@
|
||||
|
||||
#cmakedefine BUILD_CMUS 1
|
||||
|
||||
#cmakedefine HAVE_STATFS64 1
|
||||
#ifndef HAVE_STATFS64
|
||||
#define statfs64 statfs
|
||||
#endif
|
||||
|
||||
#endif /* _conky_config_h_ */
|
||||
|
@ -26,6 +26,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/resource.h>
|
||||
|
@ -27,6 +27,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/dkstat.h>
|
||||
#include <sys/param.h>
|
||||
|
10
src/fs.cc
10
src/fs.cc
@ -41,18 +41,8 @@
|
||||
|
||||
#ifdef HAVE_SYS_STATFS_H
|
||||
#include <sys/statfs.h>
|
||||
#ifndef HAVE_STATFS64
|
||||
#define statfs64 statfs
|
||||
#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__)
|
||||
#include "freebsd.h"
|
||||
#elif defined(__DragonFly__)
|
||||
|
Loading…
Reference in New Issue
Block a user