path: root/community/mapplauncherd/0001-fix-build.patch
blob: 850dda0593371b5453cc827343acdd4f11795feb (plain) (tree)

diff --git a/src/launcherlib/CMakeLists.txt b/src/launcherlib/CMakeLists.txt
index 047494b..b199674 100644
--- a/src/launcherlib/CMakeLists.txt
+++ b/src/launcherlib/CMakeLists.txt
@@ -24,7 +24,7 @@ set(HEADERS appdata.h booster.h connection.h daemon.h logger.h launcherlib.h
 # Set libraries to be linked. Shared libraries to be preloaded are not linked in anymore,
 # but dlopen():ed and listed in src/launcher/preload.h instead.
-link_libraries(${GLIB_LDFLAGS} ${DBUS_LDFLAGS} ${LIBDL} "-L/lib -lsystemd -lcap")
+link_libraries(${GLIB_LDFLAGS} ${DBUS_LDFLAGS} ${LIBDL} "-L/lib -lcap")
 # Set executable
 add_library(applauncherd SHARED ${SRC} ${MOC_SRC})
diff --git a/src/launcherlib/daemon.cpp b/src/launcherlib/daemon.cpp
index b70b377..89b8f13 100644
--- a/src/launcherlib/daemon.cpp
+++ b/src/launcherlib/daemon.cpp
@@ -43,6 +43,7 @@
 #include <stdexcept>
 #include <fstream>
 #include <sstream>
+#include <libgen.h>
 #include <stdlib.h>
 #include <systemd/sd-daemon.h>
 #include <unistd.h>
@@ -979,7 +980,7 @@ void Daemon::parseArgs(int argc, char **argv)
 // Prints the usage and exits with given status
 void Daemon::usage(const char *name, int status)
-    name = basename(name);
+    name = basename(const_cast<char *>(name));
            "Start the application launcher daemon.\n"