mirror of
https://github.com/godotengine/godot.git
synced 2025-10-22 17:33:33 +00:00
Linux/BSD: Add LINUXBSD_ENABLED define for non X11-related checks
This commit is contained in:
parent
629796c333
commit
91a54cdbc1
4 changed files with 14 additions and 9 deletions
|
@ -189,7 +189,7 @@ void DirAccessUnix::list_dir_end() {
|
|||
_cisdir = false;
|
||||
}
|
||||
|
||||
#if defined(HAVE_MNTENT) && defined(X11_ENABLED)
|
||||
#if defined(HAVE_MNTENT) && 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) {
|
||||
|
@ -213,7 +213,7 @@ static void _get_drives(List<String> *list) {
|
|||
// Add root.
|
||||
list->push_back("/");
|
||||
|
||||
#if defined(HAVE_MNTENT) && defined(X11_ENABLED)
|
||||
#if defined(HAVE_MNTENT) && defined(LINUXBSD_ENABLED)
|
||||
// Check /etc/mtab for the list of mounted partitions.
|
||||
FILE *mtab = setmntent("/etc/mtab", "r");
|
||||
if (mtab) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue