diff --git a/src/Makefile b/src/Makefile index cd246af8..209758fe 100644 --- a/src/Makefile +++ b/src/Makefile @@ -211,6 +211,9 @@ else ifeq (Linux,$(TARGET_SYS)) TARGET_XLIBS+= -ldl endif + ifeq (GNU/kFreeBSD,$(TARGET_SYS)) + TARGET_XLIBS+= -ldl + endif endif endif diff --git a/src/luaconf.h b/src/luaconf.h index 3c85cacd..02930a2f 100644 --- a/src/luaconf.h +++ b/src/luaconf.h @@ -15,7 +15,7 @@ #define LUA_DL_DLL #elif defined(__linux__) || defined(__solaris__) || defined(__CYGWIN__) || \ defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ - (defined(__MACH__) && defined(__APPLE__)) + defined(__FreeBSD_kernel__) || (defined(__MACH__) && defined(__APPLE__)) #define LUA_USE_POSIX #define LUA_DL_DLOPEN #endif