From 2c391d850fb405e03bca362caa5c90262c66fe33 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 14:40:46 +0200 Subject: CMake/private-download: Fix statfs includes on FreeBSD On FreeBSD, we have to include sys/params.h and sys/mount.h, not sys/vfs.h. Gbp-Dch: ignore --- CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f4c8b37e..b2e5bfe9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,14 +89,15 @@ if (LZ4_FOUND) endif() # Mount()ing and stat()ing and friends +check_symbol_exists(statfs sys/vfs.h HAVE_VFS_H) +check_include_files(sys/params.h HAVE_PARAMS_H) +check_symbol_exists(statfs sys/mount.h HAVE_MOUNT_H) +if (NOT HAVE_VFS_H AND NOT HAVE_MOUNT_H) + message(FATAL_ERROR "Can find neither statvfs() nor statfs()") +endif() check_function_exists(statvfs HAVE_STATVFS) if (NOT HAVE_STATVFS) - check_symbol_exists(statfs sys/vfs.h HAVE_VFS_H) - check_symbol_exists(statfs sys/mount.h HAVE_MOUNT_H) - if (NOT HAVE_VFS_H AND NOT HAVE_MOUNT_H) - message(FATAL_ERROR "Can find neither statvfs() nor statfs()") - endif() configure_file(CMake/statvfs.h.in ${PROJECT_BINARY_DIR}/include/statvfs.h COPYONLY) endif() -- cgit v1.2.3