Merge pull request #3 from PureTryOut/musl-fix-build

Fix build on Musl libc systems
pull/1/head
Matti Lehtimäki 4 years ago committed by GitHub
commit 3b7b2cf34e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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})

@ -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,8 @@ 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);
char *nameCopy = strdup(name);
name = basename(nameCopy);
printf("\n"
"Start the application launcher daemon.\n"
"\n"
@ -1008,6 +1010,8 @@ void Daemon::usage(const char *name, int status)
"\n",
name, name, name);
free(nameCopy);
exit(status);
}

Loading…
Cancel
Save