community/libgpiod: fix miscompilation from implicit basename
musl removed basename from string.h, so the code was falling back to
an implicit declaration of int basename(int)
which mangled the arg pointer
and returned an equally nonsensical one.
This patch should become unnecessary when libgpiod is updated to 2.x because newer versions do not use basename.
Fixes #15997 (closed)