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

Fall back to statfs if statfs64 not present

mostly needed for the dragonfly port (sf.net #3289079)
This commit is contained in:
Pavel Labath 2012-07-05 16:41:58 +02:00
parent fa575171c4
commit 31c2f82842
3 changed files with 7 additions and 1 deletions

View File

@ -64,6 +64,9 @@ find_package(Threads)
set(conky_libs ${CMAKE_THREAD_LIBS_INIT})
set(conky_includes ${CMAKE_BINARY_DIR})
add_definitions(-D_LARGEFILE64_SOURCE) # Standard definitions
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_LARGEFILE64_SOURCE")
# Do version stuff
set(VERSION_MAJOR "2")
set(VERSION_MINOR "0")

View File

@ -36,6 +36,7 @@ check_function_exists(strndup HAVE_STRNDUP)
check_symbol_exists(pipe2 "unistd.h" HAVE_PIPE2)
check_symbol_exists(O_CLOEXEC "fcntl.h" HAVE_O_CLOEXEC)
check_symbol_exists(statfs64 "sys/statfs.h" HAVE_STATFS64t)
AC_SEARCH_LIBS(clock_gettime "time.h" CLOCK_GETTIME_LIB "rt")
if(NOT CLOCK_GETTIME_LIB)

View File

@ -39,9 +39,11 @@
#include <sys/types.h>
#include <fcntl.h>
/* linux */
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#ifndef HAVE_STATFS64
#define statfs64 statfs
#endif
#endif
/* freebsd && netbsd */