diff options
author | mrg <mrg@pkgsrc.org> | 2004-05-04 11:30:17 +0000 |
---|---|---|
committer | mrg <mrg@pkgsrc.org> | 2004-05-04 11:30:17 +0000 |
commit | e7036407cad6463baf4c0c6d32df5910c3bcc7aa (patch) | |
tree | 60ef9361de143750bde5b0ee14cbef3b5c429618 /multimedia/kdemultimedia3/patches/patch-ad | |
parent | 885be9e9f5c403e1fec588ed26af55f271bc519a (diff) | |
download | pkgsrc-e7036407cad6463baf4c0c6d32df5910c3bcc7aa.tar.gz |
for NetBSD 2.0D and later, use statvfs(2).
XXX this should be a configure test...
Diffstat (limited to 'multimedia/kdemultimedia3/patches/patch-ad')
-rw-r--r-- | multimedia/kdemultimedia3/patches/patch-ad | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/multimedia/kdemultimedia3/patches/patch-ad b/multimedia/kdemultimedia3/patches/patch-ad new file mode 100644 index 00000000000..8530589f698 --- /dev/null +++ b/multimedia/kdemultimedia3/patches/patch-ad @@ -0,0 +1,42 @@ +$NetBSD: patch-ad,v 1.1 2004/05/04 11:30:17 mrg Exp $ + +--- kscd/libwm/plat_freebsd.c.orig 2003-05-05 22:19:39.000000000 +1000 ++++ kscd/libwm/plat_freebsd.c 2004-05-04 19:17:17.000000000 +1000 +@@ -380,6 +380,14 @@ + return (ioctl(d->fd, CDIOCSTOP)); + } /* gen_stop() */ + ++/* XXX */ ++#ifdef __NetBSD__ ++# include <sys/param.h> ++# if __NetBSD_Version__ >= 200040000 /* 2.0D */ ++# define HAVE_SYS_STATVFS_H 1 ++# endif ++#endif ++ + /*----------------------------------------* + * Eject the current CD, if there is one. + *----------------------------------------*/ +@@ -388,14 +396,22 @@ + { + /* On some systems, we can check to see if the CD is mounted. */ + struct stat stbuf; ++#ifdef HAVE_SYS_STATVFS_H ++ struct statvfs buf; ++#else + struct statfs buf; ++#endif + int rval; + + if (fstat(d->fd, &stbuf) != 0) + return (-2); + + /* Is this a mounted filesystem? */ ++#ifdef HAVE_SYS_STATVFS_H ++ if (fstatvfs(stbuf.st_rdev, &buf) == 0) ++#else + if (fstatfs(stbuf.st_rdev, &buf) == 0) ++#endif + return (-3); + + rval = ioctl(d->fd, CDIOCALLOW); |