46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
$OpenBSD: patch-freesp_c,v 1.2 2001/06/04 23:17:34 naddy Exp $
|
|
--- freesp.c.orig Fri Jun 1 21:34:43 2001
|
|
+++ freesp.c Fri Jun 1 21:38:42 2001
|
|
@@ -19,7 +19,10 @@
|
|
#if defined( SVR4 ) || defined( OSF1 ) || defined( sun56 )
|
|
#include <sys/statvfs.h>
|
|
#else
|
|
-#if ( defined( ultrix ) || defined ( __FreeBSD__ ) )
|
|
+#if ( defined( ultrix ) )
|
|
+#include <sys/mount.h>
|
|
+#else
|
|
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
|
#include <sys/param.h>
|
|
#include <sys/mount.h>
|
|
#else
|
|
@@ -30,6 +33,7 @@
|
|
/* z.B. SVR3 */
|
|
#include <sys/statfs.h>
|
|
#endif /* QNX */
|
|
+#endif /* BSD */
|
|
#endif /* ultrix */
|
|
#endif /* SVR4 */
|
|
#endif /* WIN32 */
|
|
@@ -85,8 +89,12 @@ int GetDiskParameter( char *path,
|
|
fd = open(path, O_RDONLY );
|
|
if( ( result = disk_space( fd, &free_blocks, &total_blocks ) ) == 0 )
|
|
#else
|
|
+#if defined( __OpenBSD__ )
|
|
+ if( ( result = statfs( path, &statfs_struct ) ) == 0 )
|
|
+#else
|
|
|
|
if( ( result = STATFS( path, &statfs_struct, sizeof( statfs_struct ), 0 ) ) == 0 )
|
|
+#endif /* OpenBSD */
|
|
#endif /* QNX */
|
|
#endif /* __DJGPP__ */
|
|
#endif /* WIN32 */
|
|
@@ -127,7 +135,7 @@ int GetDiskParameter( char *path,
|
|
fname = "LINUX";
|
|
}
|
|
#else
|
|
-#if defined( sun56 ) || defined( sun ) || defined( hpux ) || defined( __NeXT__ ) || defined( ultrix ) || defined ( __FreeBSD__ )
|
|
+#if defined( sun56 ) || defined( sun ) || defined( hpux ) || defined( __NeXT__ ) || defined( ultrix ) || defined ( BSD )
|
|
fname = "UNIX";
|
|
#else
|
|
#ifdef WIN32
|