Skip to content

Commit

Permalink
fix ps4 build
Browse files Browse the repository at this point in the history
  • Loading branch information
voliva committed Mar 5, 2022
1 parent 7e088bc commit 129f7c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lua/liolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ static int io_popen (lua_State *L) {

static int io_tmpfile (lua_State *L) {
LStream *p = newfile(L);
p->f = tmpfile();
// p->f = tmpfile();
return (p->f == NULL) ? luaL_fileresult(L, 0, NULL) : 1;
}

Expand Down
14 changes: 7 additions & 7 deletions lua/loslib.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ static int os_rename (lua_State *L) {


static int os_tmpname (lua_State *L) {
char buff[LUA_TMPNAMBUFSIZE];
int err;
lua_tmpnam(buff, err);
if (err)
return luaL_error(L, "unable to generate a unique filename");
lua_pushstring(L, buff);
// char buff[LUA_TMPNAMBUFSIZE];
// int err;
// lua_tmpnam(buff, err);
// if (err)
// return luaL_error(L, "unable to generate a unique filename");
// lua_pushstring(L, buff);
return 1;
}

Expand All @@ -181,7 +181,7 @@ static int os_getenv (lua_State *L) {


static int os_clock (lua_State *L) {
lua_pushnumber(L, ((lua_Number)clock())/(lua_Number)CLOCKS_PER_SEC);
lua_pushnumber(L, ((lua_Number)0)/(lua_Number)CLOCKS_PER_SEC);
return 1;
}

Expand Down
2 changes: 1 addition & 1 deletion lua/ltablib.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ typedef unsigned int IdxT;
** is to copy them to an array of a known type and use the array values.
*/
static unsigned int l_randomizePivot (void) {
clock_t c = clock();
clock_t c = 0;
time_t t = time(NULL);
unsigned int buff[sof(c) + sof(t)];
unsigned int i, rnd = 0;
Expand Down

0 comments on commit 129f7c4

Please sign in to comment.