mirror of https://github.com/mgba-emu/mgba.git
Util: Detect futimens/futimes instead of guessing
This commit is contained in:
parent
de4ea9284d
commit
74758fc3c3
|
@ -317,6 +317,9 @@ find_function(setlocale)
|
||||||
find_function(snprintf_l)
|
find_function(snprintf_l)
|
||||||
find_function(uselocale)
|
find_function(uselocale)
|
||||||
|
|
||||||
|
find_function(futimens)
|
||||||
|
find_function(futimes)
|
||||||
|
|
||||||
if(ANDROID AND ANDROID_NDK_MAJOR GREATER 13)
|
if(ANDROID AND ANDROID_NDK_MAJOR GREATER 13)
|
||||||
set(HAVE_STRTOF_L ON)
|
set(HAVE_STRTOF_L ON)
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
|
|
@ -200,9 +200,9 @@ static bool _vfdSync(struct VFile* vf, void* buffer, size_t size) {
|
||||||
UNUSED(size);
|
UNUSED(size);
|
||||||
struct VFileFD* vfd = (struct VFileFD*) vf;
|
struct VFileFD* vfd = (struct VFileFD*) vf;
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#ifdef __HAIKU__
|
#ifdef HAVE_FUTIMENS
|
||||||
futimens(vfd->fd, NULL);
|
futimens(vfd->fd, NULL);
|
||||||
#else
|
#elif defined(HAVE_FUTIMES)
|
||||||
futimes(vfd->fd, NULL);
|
futimes(vfd->fd, NULL);
|
||||||
#endif
|
#endif
|
||||||
if (buffer && size) {
|
if (buffer && size) {
|
||||||
|
|
Loading…
Reference in New Issue