030-fix_musl_compatibilty.patch 388 B

1234567891011121314
  1. --- a/output_alsa.c
  2. +++ b/output_alsa.c
  3. @@ -911,8 +911,11 @@ void output_init_alsa(log_level level, c
  4. LOG_INFO("memory locked");
  5. }
  6. +#ifdef M_TRIM_THRESHOLD
  7. + // mallopt is not defined in musl libc
  8. mallopt(M_TRIM_THRESHOLD, -1);
  9. mallopt(M_MMAP_MAX, 0);
  10. +#endif
  11. touch_memory(silencebuf, MAX_SILENCE_FRAMES * BYTES_PER_FRAME);
  12. touch_memory(outputbuf->buf, outputbuf->size);