$NetBSD: patch-ad,v 1.4 2006/01/05 20:25:16 joerg Exp $ --- ksim/monitors/filesystem/filesystemstats.cpp.orig 2005-10-05 13:26:44.000000000 +0000 +++ ksim/monitors/filesystem/filesystemstats.cpp @@ -30,7 +30,7 @@ #include #include -#ifdef HAVE_SYS_STATVFS_H +#if defined(HAVE_SYS_STATVFS_H) && !defined(__DragonFly__) #include #elif defined( HAVE_SYS_STATFS_H ) #include @@ -56,10 +56,12 @@ #include #include -#ifdef HAVE_STATVFS +#if defined(HAVE_STATVFS) && !defined(__DragonFly__) typedef struct statvfs ksim_statfs; +#define ksim_getfsstat getvfsstat #elif defined( HAVE_STATFS ) || defined( Q_OS_FREEBSD ) typedef struct statfs ksim_statfs; +#define ksim_getfsstat getfsstat #else typedef struct // fall back for (possibly) non-supported systems { @@ -70,7 +72,7 @@ typedef struct // fall back for (possibl int fsystemStats( const char * file, ksim_statfs & stats ) { -#ifdef HAVE_STATVFS +#if defined(HAVE_STATVFS) && !defined(__DragonFly__) return statvfs( file, &stats ); #elif defined( HAVE_STATFS ) || defined( Q_OS_FREEBSD ) return statfs( file, &stats ); @@ -159,9 +161,9 @@ FilesystemStats::List FilesystemStats::r #endif #ifdef USE_FSSTAT - struct statfs sfs[32]; + ksim_statfs sfs[32]; int fs_count; - if ( ( fs_count = getfsstat( sfs, sizeof( sfs ), 0 ) ) != -1 ) + if ( ( fs_count = ksim_getfsstat( sfs, sizeof( sfs ), 0 ) ) != -1 ) { for ( int i = 0; i < fs_count; i++ ) {