mirror of
https://github.com/libretro/bsnes-libretro.git
synced 2024-11-23 00:49:40 +00:00
nall: File timestamp fix for OpenBSD and DragonFly BSD, add DragonFly BSD to PLATFORM_BSD definition
This commit is contained in:
parent
3ccb543622
commit
063e645ff2
@ -82,6 +82,12 @@ struct inode {
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
//on Windows, the last status change time (ctime) holds the file creation time instead
|
||||
case time::create: return data.st_ctime;
|
||||
#elif defined(__OpenBSD__)
|
||||
// OpenBSD is a special case that must be handled separately from other BSDs
|
||||
case time::create: return min((uint)data.__st_birthtime, (uint)data.st_mtime);
|
||||
#elif defined (__DragonFly__)
|
||||
// DragonFly BSD does not support file creation time, use modified time instead
|
||||
case time::create: return data.st_mtime;
|
||||
#elif defined(PLATFORM_BSD) || defined(PLATFORM_MACOS)
|
||||
//st_birthtime may return -1 or st_atime if it is not supported by the file system
|
||||
//the best that can be done in this case is to return st_mtime if it's older
|
||||
|
@ -98,7 +98,7 @@ namespace nall {
|
||||
constexpr auto platform() -> Platform { return Platform::Linux; }
|
||||
constexpr auto api() -> API { return API::Posix; }
|
||||
constexpr auto display() -> DisplayServer { return DisplayServer::Xorg; }
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined (__DragonFly__)
|
||||
#define PLATFORM_BSD
|
||||
#define API_POSIX
|
||||
#define DISPLAY_XORG
|
||||
|
Loading…
Reference in New Issue
Block a user