]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
modules: use LIBEXT to fix Darwin
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 29 Sep 2017 21:00:43 +0000 (23:00 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 29 Sep 2017 21:00:43 +0000 (23:00 +0200)
daemon/daemon.mk
daemon/engine.c
platform.mk

index 12ccc63036f11505ad5735b6b155dbb5aa5fe277..07e165370cd8914520695590d30c2ef2e4a64bc4 100644 (file)
@@ -32,6 +32,7 @@ kresd_CFLAGS := -fPIE \
                -Dlibknot_SONAME=\"$(libknot_SONAME)\" \
                -Dlibzscanner_SONAME=\"$(libzscanner_SONAME)\" \
                -DROOTHINTS=\"$(ROOTHINTS)\" \
+               -DLIBEXT=\"$(LIBEXT)\" \
                -DLUA_HAS_SETFUNCS="$(LUA_HAS_SETFUNCS)"
 kresd_DEPEND := $(libkres) $(contrib)
 kresd_LIBS := $(libkres_TARGET) $(contrib_TARGET) $(libknot_LIBS) \
index 13870c3cf8d790f4c0fc2d80090ef888cfe66a88..44f68c21600a876773e6770c7a311a0d9f06a2ef 100644 (file)
@@ -234,8 +234,8 @@ int engine_set_moduledir(struct engine *engine, const char *moduledir) {
                 "if package._path == nil then package._path = package.path end\n"
                 "package.path = '%1$s/?.lua;%1$s/?/init.lua;'..package._path\n"
                 "if package._cpath == nil then package._cpath = package.cpath end\n"
-                "package.cpath = '%1$s/?.so;'..package._cpath\n",
-                new_moduledir);
+                "package.cpath = '%1$s/?%2$s;'..package._cpath\n",
+                new_moduledir, LIBEXT);
 
        int ret = l_dobytecode(engine->L, l_paths, strlen(l_paths), "");
        if (ret != 0) {
index ad3367c18303fb6c95ce929bfb0f93ef8fc8c8cc..03669a131585f1fa8a29d670cc41144df1c4c025 100644 (file)
@@ -9,7 +9,6 @@ GO := go
 CAT := cat
 SED := sed
 LIBEXT := .so
-MODEXT := $(LIBEXT)
 AREXT  := .a
 LIBTYPE := shared
 MODTYPE := shared
@@ -130,7 +129,6 @@ make_bin = $(call make_target,$(1),$(2),$(BINEXT),$(BINFLAGS),$(BINDIR),$(3))
 make_sbin = $(call make_target,$(1),$(2),$(BINEXT),$(BINFLAGS),$(SBINDIR),$(3))
 make_lib = $(call make_target,$(1),$(2),$(LIBEXT),-$(LIBTYPE),$(LIBDIR),$(3),$(4))
 make_module = $(call make_target,$(1),$(2),$(LIBEXT),-$(LIBTYPE),$(MODULEDIR),$(3))
-make_shared = $(call make_target,$(1),$(2),$(MODEXT),-$(MODTYPE),$(LIBDIR),$(3))
 make_static = $(call make_target,$(1),$(2),$(AREXT),-$(ARTYPE),$(LIBDIR),$(3))
 
 # Find library (pkg-config)