Fix build on FreeBSD (#4051)
* Fix radio firmwares build under FreeBSD (#4050) * Fix companion "mountlist" build under FreeBSD (#4049)
This commit is contained in:
committed by
Bertrand Songis
parent
a35d6b6a05
commit
908138d81a
@@ -455,7 +455,7 @@ read_file_system_list (bool need_fs_type)
|
||||
me = (mount_entry *) malloc (sizeof *me);
|
||||
me->me_devname = strdup (fsp->f_mntfromname);
|
||||
me->me_mountdir = strdup (fsp->f_mntonname);
|
||||
#if defined(__APPLE__) || defined(__OpenBSD__)
|
||||
#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__)
|
||||
me->me_type = fsp->f_fstypename;
|
||||
#else
|
||||
me->me_type = fsp->fs_typename;
|
||||
|
||||
@@ -601,7 +601,7 @@ char *findTrueFileName(const char *path)
|
||||
for (;;) {
|
||||
struct simu::dirent * res = simu::readdir(dir);
|
||||
if (res == 0) break;
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
if ((res->d_type == DT_REG) || (res->d_type == DT_LNK)) {
|
||||
#else
|
||||
if ((res->d_type == simu::DT_REG) || (res->d_type == simu::DT_LNK)) {
|
||||
@@ -771,7 +771,7 @@ FRESULT f_readdir (DIR * rep, FILINFO * fil)
|
||||
if (strcmp(ent->d_name, ".") && strcmp(ent->d_name, "..") ) break;
|
||||
}
|
||||
|
||||
#if defined(WIN32) || !defined(__GNUC__) || defined(__APPLE__)
|
||||
#if defined(WIN32) || !defined(__GNUC__) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||
fil->fattrib = (ent->d_type == DT_DIR ? AM_DIR : 0);
|
||||
#else
|
||||
if (ent->d_type == simu::DT_UNKNOWN) {
|
||||
|
||||
Reference in New Issue
Block a user