Skip to content

Detect the presence of malloc_trim to fix the build with musl

Heiko Becker requested to merge work/musl-fix-glibc-instead-of-gnuc into master

malloc_trim is indeed a GNU extension, but an extension of glibc. Relying on GNUC unfortunately doesn't help with that. Check for the actual presence of malloc_trim with cmake's check_function_exists instead. This fixes the build with musl libc, which doesn't come with malloc_trim.

Co-authored-by: Ahmad Samir a.samirh78@gmail.com

Edited by Heiko Becker

Merge request reports

Loading