kdecore: include paths header if present on the system

fixes mount points detection on systems using musl libc

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-08-26 01:44:23 +03:00
parent 442ac9d3a4
commit b6f77397c5
3 changed files with 6 additions and 0 deletions

View file

@ -38,6 +38,7 @@ check_include_files(sys/mntent.h HAVE_SYS_MNTENT_H) # solid,
check_include_files("sys/param.h;sys/mount.h" HAVE_SYS_MOUNT_H) # kio, kdecore
check_include_files(unistd.h HAVE_UNISTD_H) # various
check_include_files(stdint.h HAVE_STDINT_H) # various
check_include_files(paths.h HAVE_PATHS_H) # kdecore
check_include_files(sys/time.h HAVE_SYS_TIME_H) # various

View file

@ -19,6 +19,7 @@
#cmakedefine HAVE_LIMITS_H 1
#cmakedefine HAVE_MNTENT_H 1
#cmakedefine HAVE_UNISTD_H 1
#cmakedefine HAVE_PATHS_H 1
#cmakedefine HAVE_BACKTRACE 1
#cmakedefine HAVE_GETMNTINFO 1

View file

@ -31,6 +31,10 @@
static Qt::CaseSensitivity cs = Qt::CaseSensitive;
#ifdef HAVE_PATHS_H
#include <paths.h> // for _PATH_MOUNTED
#endif
#ifdef HAVE_SYS_MNTTAB_H
#include <sys/mnttab.h>
#endif