1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-32776 plugin disks getmntinfo64 deprecated on macOS

The getmntinfo64 interface is deprected in MacOSX12.1.sdk.

Using getmntinfo instead.

Thanks heyingquay for reporting the bug and testing the fix.
This commit is contained in:
Daniel Black
2023-11-14 07:12:23 +11:00
parent 0f4df26bec
commit 5b9a7871ca
2 changed files with 2 additions and 8 deletions

View File

@ -37,8 +37,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 +45,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
@ -148,8 +145,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