Convert GETMNTINFO_USES_STATVFS check to CMake

Fix to build on such platforms, it is used but not checked with CMake.

(cherry picked from commit 6716d0dfb9)
v3.5.13-sru
OBATA Akio 6 years ago committed by Slávek Banko
parent 50aef34ec6
commit 6f0a158d33
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -335,6 +335,17 @@ if( ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" )
endif( ) endif( )
check_function_exists( getmntinfo HAVE_GETMNTINFO ) 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( getnameinfo HAVE_GETNAMEINFO )
check_function_exists( getpagesize HAVE_GETPAGESIZE ) check_function_exists( getpagesize HAVE_GETPAGESIZE )
check_function_exists( getpeereid HAVE_GETPEEREID ) check_function_exists( getpeereid HAVE_GETPEEREID )

@ -24,7 +24,7 @@
#undef GETADDRINFO_RETURNS_UNIX #undef GETADDRINFO_RETURNS_UNIX
/* getmntinfo() uses struct statvfs */ /* getmntinfo() uses struct statvfs */
#undef GETMNTINFO_USES_STATVFS #cmakedefine GETMNTINFO_USES_STATVFS
/* Define if you have the MIT Kerberos libraries */ /* Define if you have the MIT Kerberos libraries */
#undef GSSAPI_MIT #undef GSSAPI_MIT

Loading…
Cancel
Save