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

Fixed build with musl libc #5

Merged
merged 1 commit into from
Jan 20, 2022
Merged

Fixed build with musl libc #5

merged 1 commit into from
Jan 20, 2022

Conversation

steinex
Copy link
Contributor

@steinex steinex commented Jan 20, 2022

While packaging for Void, I noticed that SwayAudioIdleInhibit doesn't build with musl libc. The issue is the usage of basename(3) whereof 2 different implementations exist on Linux:

  • the POSIX version where you should include <libgen.h>
  • the GNU version where you should #define _GNU_SOURCE

glibc will ignore this and default to the GNU version whereas musl is strict here and wants one of them explicitely set.

To keep things portable I opted for the POSIX version and tested that things still work as expected.

@steinex steinex mentioned this pull request Jan 20, 2022
src/main.cpp Outdated Show resolved Hide resolved
@ErikReider ErikReider merged commit 4a481a0 into ErikReider:main Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants