fraunhoferhhi / vvdec

VVdeC, the Fraunhofer Versatile Video Decoder
https://www.hhi.fraunhofer.de/en/departments/vca/technologies-and-solutions/h266-vvc.html
BSD 3-Clause Clear License
454 stars 91 forks source link

adding musl libc compilation compatibility #120

Closed Matthieu-Sauer closed 1 year ago

Matthieu-Sauer commented 1 year ago

I tried to use vvdec on an alpine linux (which use musl libc as default libc) and encountered a compilation error

The cause was the usage of malloc_trim as it is a GNU libc extension.

I therefore added a check with the macro GLIBC which should always be defined when compiled using glibc since musl libc is (or aims to be) fully POSIX compliant, I assume there is no other incompatibility here.

K-os commented 1 year ago

Thank you very much. Would you like to also remove the && !defined( ANDROID ) in the same line, because yours is the more general solution.

Matthieu-Sauer commented 1 year ago

Oh sure, do you want me to remove all verifications of ANDROID macro and replace it with GLIBC one?

Matthieu-Sauer commented 1 year ago

it should be done now, I asked previous question without having checked the presence of said ANDROID macro, feel free to ignore it

K-os commented 1 year ago

Thank you.