diff --git a/src/lua/fio.cc b/src/lua/fio.cc index d847e5c5386ee4b7362038534bba0d3e90190075..375492d68d7674c722d61dc31349fb1f0f651898 100644 --- a/src/lua/fio.cc +++ b/src/lua/fio.cc @@ -268,6 +268,14 @@ lbox_fio_lseek(struct lua_State *L) return 1; } +#if defined(__APPLE__) +static int +lbox_fio_pushtimespec(struct lua_State *L, const time_t *ts) +{ + lua_pushnumber(L, *ts); + return 1; +} +#else static int lbox_fio_pushtimespec(struct lua_State *L, const struct timespec *ts) { @@ -276,6 +284,7 @@ lbox_fio_pushtimespec(struct lua_State *L, const struct timespec *ts) lua_pushnumber(L, ts->tv_sec + nsec); return 1; } +#endif #define PUSHTABLE(name, method, value) { \ lua_pushliteral(L, name); \