diff --git a/src/lua/compat.h b/src/lua/compat.h
index c1a13a2..a5106c6 100644
--- a/src/lua/compat.h
+++ b/src/lua/compat.h
@@ -20,7 +20,7 @@
 #include <lua.h>
 #include <lauxlib.h>
 
-#if LUA_VERSION_RELEASE_NUM < 502
+#if LUA_VERSION_NUM < 502
 
 static inline void luaL_setmetatable(lua_State* L, const char* name) {
 	luaL_checkstack(L, 1, "not enough stack slots");
