aports/main/apk-tools/lua-apk_time.patch
2019-06-14 17:31:21 +00:00

21 lines
414 B
Diff

diff --git a/src/lua-apk.c b/src/lua-apk.c
index 532577a..26129fb 100644
--- a/src/lua-apk.c
+++ b/src/lua-apk.c
@@ -37,6 +37,15 @@ struct flagmap opendb_flagmap[] = {
{NULL, 0}
};
+time_t apk_time(void)
+{
+#ifdef TEST_MODE
+ return 1559567666;
+#else
+ return time(NULL);
+#endif
+}
+
/* implemented as luaL_typerror until lua 5.1, dropped in 5.2
* (C) 1994-2012 Lua.org, PUC-Rio. MIT license
*/