wine ie5setup reports it can't determine the free disk space. truss shows statfs failed with EOVERFLOW and sys/statfs.h says: * Structure returned by statfs(2) and fstatfs(2). * This structure and associated system calls have been replaced * by statvfs(2) and fstatvfs(2) and will be removed from the system * in a near-future release. This patch allows wine ie5setup to at least startup. A cleaner patch would probably use an explict autoconf check for statvfs in addition to checking for sys/vfs.h. ChangeLog: Fri Jan 17 18:02:37 EST 2003 John Wehle (john@feith.com) * files/drive.c (DRIVE_GetFreeSpace): Use statvfs on systems which have sys/vfs.h. Enjoy! -- John Wehle ------------------8<------------------------8<------------------------ *** files/drive.c.ORIGINAL Mon Jan 13 15:44:13 2003 --- files/drive.c Fri Jan 17 17:47:04 2003 *************** *** 42,48 **** #ifdef HAVE_SYS_PARAM_H # include #endif ! #ifdef STATFS_DEFINED_BY_SYS_VFS # include #else # ifdef STATFS_DEFINED_BY_SYS_MOUNT --- 42,48 ---- #ifdef HAVE_SYS_PARAM_H # include #endif ! #ifdef HAVE_SYS_VFS_H # include #else # ifdef STATFS_DEFINED_BY_SYS_MOUNT *************** int DRIVE_RawWrite(BYTE drive, DWORD beg *** 1289,1295 **** --- 1289,1299 ---- static int DRIVE_GetFreeSpace( int drive, PULARGE_INTEGER size, PULARGE_INTEGER available ) { + #ifdef HAVE_SYS_VFS_H + struct statvfs info; + #else struct statfs info; + #endif if (!DRIVE_IsValid(drive)) { *************** static int DRIVE_GetFreeSpace( int drive *** 1297,1305 **** return 0; } ! /* FIXME: add autoconf check for this */ ! #if defined(__svr4__) || defined(_SCO_DS) || defined(__sun) ! if (statfs( DOSDrives[drive].root, &info, 0, 0) < 0) #else if (statfs( DOSDrives[drive].root, &info) < 0) #endif --- 1301,1308 ---- return 0; } ! #ifdef HAVE_SYS_VFS_H ! if (statvfs( DOSDrives[drive].root, &info) < 0) #else if (statfs( DOSDrives[drive].root, &info) < 0) #endif ------------------------------------------------------------------------- | Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com | | John Wehle | Fax: 1-215-540-5495 | | -------------------------------------------------------------------------