Closed PureTryOut closed 1 year ago
Hi, I'm trying to get Miraclecast compiled and running for Alpine Linux which means it has to work with Musl and OpenRC. I've already applied #441 locally which helps, but compilation fails on the use of strndupa in https://github.com/albfan/miraclecast/blob/master/src/shared/shl_util.c#L829, which is non-portable and a GNU extension. https://linux.die.net/man/3/strdupa
strndupa
It would be great if this could be ported away from to something POSIX, so this can be compiled on Musl systems like Alpine Linux.
From https://stackoverflow.com/a/33728005/848072, looks like strdupa freed automatically the memory, so I'm totally ok with a PR wrapping with _GNU_SOURCE or using strdupa and freed at the end.
fixed on b46679d
Hi, I'm trying to get Miraclecast compiled and running for Alpine Linux which means it has to work with Musl and OpenRC. I've already applied #441 locally which helps, but compilation fails on the use of
strndupa
in https://github.com/albfan/miraclecast/blob/master/src/shared/shl_util.c#L829, which is non-portable and a GNU extension. https://linux.die.net/man/3/strdupaIt would be great if this could be ported away from to something POSIX, so this can be compiled on Musl systems like Alpine Linux.