Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on Musl libc systems #3

Merged
merged 2 commits into from Jun 23, 2021
Merged

Fix build on Musl libc systems #3

merged 2 commits into from Jun 23, 2021

Conversation

PureTryOut
Copy link
Contributor

@PureTryOut PureTryOut commented Jun 18, 2021

Make sure we use the POSIX basename rather than GNU's.
When we include libgen.h, POSIX's basename will be used rather than
GNU's. Since we don't use the special functionalities of GNU's variant
anyway, this helps to compile it on POSIX-compliant libc's like Musl.

Don't link to systemd twice.
We link (in a proper CMake way) later a bit below this line, and that
actually works on systems using e.g. elogind too.

When we include libgen.h, POSIX's basename will be used rather than
GNU's. Since we don't use the special functionalities of GNU's variant
anyway, this helps to compile it on POSIX-compliant libc's like Musl.

https://www.man7.org/linux/man-pages/man3/basename.3.html
We link (in a proper CMake way) later a bit below this line, and that
actually works on systems using e.g. elogind too.
Copy link
Contributor

@spiiroin spiiroin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mlehtima mlehtima merged commit 3b7b2cf into sailfishos:master Jun 23, 2021
@PureTryOut PureTryOut deleted the musl-fix-build branch June 24, 2021 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants