Skip to content

Commit b982ebb

Browse files
committed
bugfix: fixed compatibility regression with MinGW gcc. this bug had appeared in commit 7923c63.
1 parent 6d4bb10 commit b982ebb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/x64/src/lj_str_hash_x64.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
#undef LJ_AINLINE
2222
#define LJ_AINLINE
2323

24+
#ifdef __MINGW32__
25+
#define random() ((long) rand())
26+
#define srandom(seed) srand(seed)
27+
#endif
28+
2429
static const uint64_t* cast_uint64p(const char* str)
2530
{
2631
return (const uint64_t*)(void*)str;

0 commit comments

Comments
 (0)