From 63c7c39d7d999cdfa1a199dfceab653c711f3036 Mon Sep 17 00:00:00 2001 From: "Dmitry E. Oboukhov" <unera@debian.org> Date: Tue, 19 Aug 2014 12:41:04 +0400 Subject: [PATCH] #442 MacOS uses the other timestamp names (try to fix build bug) --- src/lua/fio.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/lua/fio.cc b/src/lua/fio.cc index 911c29a497..d847e5c538 100644 --- a/src/lua/fio.cc +++ b/src/lua/fio.cc @@ -298,9 +298,15 @@ lbox_fio_pushstat(struct lua_State *L, const struct stat *stat) PUSHTABLE("size", lua_pushinteger, stat->st_size); PUSHTABLE("blksize", lua_pushinteger, stat->st_blksize); PUSHTABLE("blocks", lua_pushinteger, stat->st_blocks); - PUSHTABLE("ctime", lbox_fio_pushtimespec, &stat->st_ctim); - PUSHTABLE("mtime", lbox_fio_pushtimespec, &stat->st_mtim); - PUSHTABLE("atime", lbox_fio_pushtimespec, &stat->st_atim); + #if defined(__APPLE__) + PUSHTABLE("ctime", lbox_fio_pushtimespec, &stat->st_ctime); + PUSHTABLE("mtime", lbox_fio_pushtimespec, &stat->st_mtime); + PUSHTABLE("atime", lbox_fio_pushtimespec, &stat->st_atime); + #else + PUSHTABLE("ctime", lbox_fio_pushtimespec, &stat->st_ctim); + PUSHTABLE("mtime", lbox_fio_pushtimespec, &stat->st_mtim); + PUSHTABLE("atime", lbox_fio_pushtimespec, &stat->st_atim); + #endif return 1; } -- GitLab