mirror of
https://github.com/holub/mame
synced 2025-10-05 00:38:58 +03:00
Implement missing osd_truncate().
Fixes linking on Unix when SDL is disabled. Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
This commit is contained in:
parent
ee5bdcffe6
commit
923b78aa71
@ -101,6 +101,25 @@ file_error osd_write(osd_file *file, const void *buffer, UINT64 offset, UINT32 l
|
||||
}
|
||||
|
||||
|
||||
//============================================================
|
||||
// osd_truncate
|
||||
//============================================================
|
||||
|
||||
file_error osd_truncate(osd_file *file, UINT64 offset)
|
||||
{
|
||||
UINT32 result;
|
||||
|
||||
if (!file)
|
||||
return FILERR_FAILURE;
|
||||
|
||||
result = ftruncate(fileno((FILE *)file), offset);
|
||||
if (!result)
|
||||
return FILERR_FAILURE;
|
||||
|
||||
return FILERR_NONE;
|
||||
}
|
||||
|
||||
|
||||
//============================================================
|
||||
// osd_rmfile
|
||||
//============================================================
|
||||
|
Loading…
Reference in New Issue
Block a user