mirror of
https://github.com/simh/simh.git
synced 2026-04-28 04:44:55 +00:00
Fix to allow raw disk access even if Large File support isn't available on the host
This commit is contained in:
@@ -1970,10 +1970,17 @@ fsync ((int)((long)f));
|
||||
|
||||
static t_offset sim_os_disk_size_raw (FILE *f)
|
||||
{
|
||||
#if defined (DONT_DO_LARGEFILE)
|
||||
struct stat statb;
|
||||
|
||||
if (fstat ((int)((long)f), &statb))
|
||||
return (t_offset)-1;
|
||||
#else
|
||||
struct stat64 statb;
|
||||
|
||||
if (fstat64 ((int)((long)f), &statb))
|
||||
return (t_offset)-1;
|
||||
#endif
|
||||
return (t_offset)statb.st_size;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user