diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2018-09-21 12:37:37 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2018-09-21 12:37:37 +0200 |
commit | 830ea2b69faa81a8b0485a28fc329fd93d67ad46 (patch) | |
tree | e892119e70a65600db800b93e9014f75a2870b0a /kscd/libwm/plat_linux.c | |
parent | 11485aa4a296406f2d6a96d7f30d09d416d91f03 (diff) | |
download | tdemultimedia-830ea2b69faa81a8b0485a28fc329fd93d67ad46.tar.gz tdemultimedia-830ea2b69faa81a8b0485a28fc329fd93d67ad46.zip |
Replace deprecated ustat using fstatfs
This resolves FTBFS with glibc 2.28
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kscd/libwm/plat_linux.c')
-rw-r--r-- | kscd/libwm/plat_linux.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/kscd/libwm/plat_linux.c b/kscd/libwm/plat_linux.c index 6ca8b578..84f2b6cd 100644 --- a/kscd/libwm/plat_linux.c +++ b/kscd/libwm/plat_linux.c @@ -58,13 +58,7 @@ typedef unsigned long long __u64; #if defined(BSD_MOUNTTEST) #include <mntent.h> #else - /* - * this is for glibc 2.x which defines ust structure in - * ustat.h not stat.h - */ - #ifdef __GLIBC__ - #include <sys/ustat.h> - #endif + #include <sys/statfs.h> #endif @@ -604,7 +598,7 @@ gen_eject(struct wm_drive *d) { struct stat stbuf; #if !defined(BSD_MOUNTTEST) - struct ustat ust; + struct statfs sfsbuf; #else struct mntent *mnt; FILE *fp; @@ -619,7 +613,7 @@ gen_eject(struct wm_drive *d) /* Is this a mounted filesystem? */ #if !defined(BSD_MOUNTTEST) - if (ustat(stbuf.st_rdev, &ust) == 0) + if (fstatfs(d->fd, &sfsbuf) == 0) return (-3); #else /* |