summaryrefslogtreecommitdiff
path: root/x11/kdebase3/patches/patch-ah
blob: cfb80000dd31a01cbbdeea750f3da3e01b8865b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$NetBSD: patch-ah,v 1.9 2007/01/26 02:49:25 markd Exp $

--- kioslave/media/kfile-plugin/kfilemediaplugin.cpp.orig	2007-01-25 11:51:55.000000000 +1300
+++ kioslave/media/kfile-plugin/kfilemediaplugin.cpp
@@ -29,7 +29,22 @@
 #include <qapplication.h>
 #include <qfile.h>
 
-#include <sys/statvfs.h>
+#if defined(__OpenBSD__) || defined(__NetBSD__)
+# include <sys/param.h>
+# if __NetBSD_Version__ >= 299000900    /* 2.99.9 */
+#  define HAVE_STATVFS 1
+# endif
+#else
+# define HAVE_STATVFS 1
+#endif
+
+#ifdef HAVE_STATVFS
+# include <sys/statvfs.h>
+#else
+# include <sys/mount.h>
+# define statvfs statfs
+# define f_frsize f_bsize
+#endif
 
 typedef KGenericFactory<KFileMediaPlugin> KFileMediaPluginFactory;
 K_EXPORT_COMPONENT_FACTORY(kfile_media, KFileMediaPluginFactory("kio_media"))