|
@@ -46,7 +46,7 @@
|
|
|
#include <sys/stat.h>
|
|
|
#include <sys/statvfs.h>
|
|
|
|
|
|
-#ifdef HAVE_MNTENT
|
|
|
+#if __has_include(<mntent.h>)
|
|
|
#include <mntent.h>
|
|
|
#endif
|
|
|
|
|
@@ -192,7 +192,7 @@ void DirAccessUnix::list_dir_end() {
|
|
|
_cisdir = false;
|
|
|
}
|
|
|
|
|
|
-#if defined(HAVE_MNTENT) && defined(LINUXBSD_ENABLED)
|
|
|
+#if __has_include(<mntent.h>) && defined(LINUXBSD_ENABLED)
|
|
|
static bool _filter_drive(struct mntent *mnt) {
|
|
|
// Ignore devices that don't point to /dev
|
|
|
if (strncmp(mnt->mnt_fsname, "/dev", 4) != 0) {
|
|
@@ -216,7 +216,7 @@ static void _get_drives(List<String> *list) {
|
|
|
// Add root.
|
|
|
list->push_back("/");
|
|
|
|
|
|
-#if defined(HAVE_MNTENT) && defined(LINUXBSD_ENABLED)
|
|
|
+#if __has_include(<mntent.h>) && defined(LINUXBSD_ENABLED)
|
|
|
// Check /etc/mtab for the list of mounted partitions.
|
|
|
FILE *mtab = setmntent("/etc/mtab", "r");
|
|
|
if (mtab) {
|