FeralInteractive / gamemode

Optimise Linux system performance on demand
BSD 3-Clause "New" or "Revised" License
4.67k stars 184 forks source link

use posix basename to fix build on musl #464

Closed Calandracas606 closed 5 months ago

Calandracas606 commented 6 months ago

Fixes an issue where the build failed with musl and gcc 13.2

glibc provides a nonstandard basename implementation, this can be overriden and posix basename can be used by including libgen.h, however musl only has posix basename, and must always include libgen.h

In this particular case, it doesn't appear that using the posix version of basename will cause any issues, as it is simply being used to match a hardcoded config file name.

This is probably safe, since musl has been always been using posix basename without issues, but some further testing with glibc might be needed