Browse Source

Convert GETMNTINFO_USES_STATVFS check to CMake

Fix to build on such platforms, it is used but not checked with CMake.
pull/19/head
OBATA Akio 8 months ago
parent
commit
6716d0dfb9
2 changed files with 12 additions and 1 deletions
  1. 11
    0
      CMakeLists.txt
  2. 1
    1
      config.h.cmake

+ 11
- 0
CMakeLists.txt View File

@@ -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 )

+ 1
- 1
config.h.cmake View File

@@ -24,7 +24,7 @@
#undef GETADDRINFO_RETURNS_UNIX

/* getmntinfo() uses struct statvfs */
#undef GETMNTINFO_USES_STATVFS
#cmakedefine GETMNTINFO_USES_STATVFS

/* Define if you have the MIT Kerberos libraries */
#undef GSSAPI_MIT

Loading…
Cancel
Save