diff --git a/src/lua/fio.cc b/src/lua/fio.cc
index 911c29a4971761517cdfb1e98070a9e5822bd111..d847e5c5386ee4b7362038534bba0d3e90190075 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;
 }