diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/testmod.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/testmod.c b/tests/testmod.c index 3bf2cd3..0d73ed4 100644 --- a/tests/testmod.c +++ b/tests/testmod.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | #include <stdio.h> | 1 | #include <stdio.h> |
| 2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
| 3 | #include <errno.h> | ||
| 3 | #include "compat-5.3.h" | 4 | #include "compat-5.3.h" |
| 4 | 5 | ||
| 5 | 6 | ||
| @@ -285,6 +286,7 @@ static int test_buffer (lua_State *L) { | |||
| 285 | 286 | ||
| 286 | static int test_exec (lua_State *L) { | 287 | static int test_exec (lua_State *L) { |
| 287 | const char *cmd = luaL_checkstring(L, 1); | 288 | const char *cmd = luaL_checkstring(L, 1); |
| 289 | errno = 0; | ||
| 288 | return luaL_execresult(L, system(cmd)); | 290 | return luaL_execresult(L, system(cmd)); |
| 289 | } | 291 | } |
| 290 | 292 | ||
