summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2019-01-25 16:01:05 +0900
committerOBATA Akio <obache@wizdas.com>2019-01-25 16:01:05 +0900
commit6716d0dfb9c50b388817118469d1e2b7dc7ae46a (patch)
tree961717ca6d7830409e24c1d1742d0d1cc1fbb8e3 /CMakeLists.txt
parent96ea8604a1ff0a42aceb86e9e99ec2ad7026f726 (diff)
downloadtdelibs-6716d0dfb9c50b388817118469d1e2b7dc7ae46a.tar.gz
tdelibs-6716d0dfb9c50b388817118469d1e2b7dc7ae46a.zip
Convert GETMNTINFO_USES_STATVFS check to CMake
Fix to build on such platforms, it is used but not checked with CMake.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3291a7090..adf408e91 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -352,6 +352,17 @@ if( ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" )
endif( )
check_function_exists( getmntinfo HAVE_GETMNTINFO )
+if( HAVE_GETMNTINFO )
+ check_cxx_source_compiles("
+ #include <sys/types.h>
+ #include <sys/statvfs.h>
+ int main(){
+ struct statvfs *mntbufp;
+ int flags;
+ return getmntinfo(&mntbufp, flags);
+ }"
+ GETMNTINFO_USES_STATVFS )
+endif( HAVE_GETMNTINFO )
check_function_exists( getnameinfo HAVE_GETNAMEINFO )
check_function_exists( getpagesize HAVE_GETPAGESIZE )
check_function_exists( getpeereid HAVE_GETPEEREID )