summaryrefslogtreecommitdiffstats
path: root/plugin/disks/information_schema_disks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/disks/information_schema_disks.cc')
-rw-r--r--plugin/disks/information_schema_disks.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugin/disks/information_schema_disks.cc b/plugin/disks/information_schema_disks.cc
index 15e26dad..01df3259 100644
--- a/plugin/disks/information_schema_disks.cc
+++ b/plugin/disks/information_schema_disks.cc
@@ -19,7 +19,7 @@
#include <sys/types.h>
#if defined(HAVE_GETMNTENT)
#include <mntent.h>
-#elif !defined(HAVE_GETMNTINFO_TAKES_statvfs)
+#elif defined(HAVE_GETMNTINFO) && !defined(HAVE_GETMNTINFO_TAKES_statvfs)
/* getmntinfo (the not NetBSD variants) */
#include <sys/param.h>
#include <sys/ucred.h>
@@ -28,6 +28,9 @@
#if defined(HAVE_GETMNTENT_IN_SYS_MNTAB)
#include <sys/mnttab.h>
#define HAVE_GETMNTENT
+#if defined(HAVE_SYS_MNTENT_H)
+#include <sys/mntent.h>
+#endif
#endif
#include <sql_class.h>
#include <sql_i_s.h>
@@ -37,8 +40,7 @@
This intends to support *BSD's, macOS, Solaris, AIX, HP-UX, and Linux.
specificly:
- FreeBSD/OpenBSD/DragonFly (statfs) NetBSD (statvfs) uses getmntinfo().
- macOS uses getmntinfo64().
+ FreeBSD/OpenBSD/DragonFly/macOS (statfs) NetBSD (statvfs) uses getmntinfo().
Linux can use getmntent_r(), but we've just used getmntent for simplification.
Linux/Solaris/AIX/HP-UX uses setmntent()/getmntent().
Solaris uses getmntent() with a diffent prototype, return structure, and
@@ -46,8 +48,6 @@
*/
#if defined(HAVE_GETMNTINFO_TAKES_statvfs) || defined(HAVE_GETMNTENT)
typedef struct statvfs st_info;
-#elif defined(HAVE_GETMNTINFO64)
-typedef struct statfs64 st_info;
#else // GETMNTINFO
typedef struct statfs st_info;
#endif
@@ -150,8 +150,6 @@ static int disks_fill_table(THD* pThd, TABLE_LIST* pTables, Item* pCond)
#if defined(HAVE_GETMNTINFO_TAKES_statvfs)
count= getmntinfo(&s, ST_WAIT);
-#elif defined(HAVE_GETMNTINFO64)
- count= getmntinfo64(&s, MNT_WAIT);
#else
count= getmntinfo(&s, MNT_WAIT);
#endif