Skip to content

Commit cb291f3

Browse files
committed
fix to compile after recent libc changes
1 parent 86c077d commit cb291f3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/lmathlib.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
#define PI (3.14159265358979323846)
2222
#define RADIANS_PER_DEGREE (PI/180.0)
2323

24-
#define HUGE_VAL 2147483647LU
24+
// #define HUGE_VAL 2147483647LU
2525

2626

27-
int32_t ldexp(int32_t x, int32_t exp) {
27+
int32_t ldexp2(int32_t x, int32_t exp) {
2828
if (x == 0) {
2929
return 0;
3030
}
@@ -177,7 +177,7 @@ static int math_frexp (lua_State *L) {
177177
#endif
178178

179179
static int math_ldexp (lua_State *L) {
180-
lua_pushnumber(L, ldexp(luaL_checknumber(L, 1), luaL_checkint(L, 2)));
180+
lua_pushnumber(L, ldexp2(luaL_checknumber(L, 1), luaL_checkint(L, 2)));
181181
return 1;
182182
}
183183

0 commit comments

Comments
 (0)