mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 17:33:44 +01:00
8b0fb154f7
second part of the fix by Rainer Orth
25 lines
778 B
CMake
25 lines
778 B
CMake
INCLUDE (CheckIncludeFiles)
|
|
|
|
CHECK_SYMBOL_EXISTS (getmntent "mntent.h" HAVE_GETMNTENT)
|
|
CHECK_SYMBOL_EXISTS (getmntent "sys/mnttab.h" HAVE_GETMNTENT_IN_SYS_MNTAB)
|
|
CHECK_SYMBOL_EXISTS (setmntent "mntent.h" HAVE_SETMNTENT)
|
|
CHECK_SYMBOL_EXISTS (getmntinfo "sys/types.h;sys/mount.h" HAVE_GETMNTINFO)
|
|
|
|
CHECK_INCLUDE_FILES (sys/mntent.h HAVE_SYS_MNTENT_H)
|
|
|
|
IF (HAVE_GETMNTINFO)
|
|
CHECK_CXX_SOURCE_COMPILES("
|
|
#include <sys/types.h>
|
|
#include <sys/statvfs.h>
|
|
int main()
|
|
{
|
|
struct statvfs *s;
|
|
return getmntinfo(&s, ST_WAIT);
|
|
}
|
|
" HAVE_GETMNTINFO_TAKES_statvfs)
|
|
ENDIF()
|
|
IF (HAVE_GETMNTENT OR HAVE_GETMNTENT_IN_SYS_MNTAB OR
|
|
HAVE_GETMNTINFO)
|
|
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
|
|
MYSQL_ADD_PLUGIN(DISKS information_schema_disks.cc MODULE_ONLY RECOMPILE_FOR_EMBEDDED)
|
|
ENDIF()
|