Skip to content

community/ezstream: fix segfault caused by implicit function declaration

Sören Tempel requested to merge nmeum/aports:ezstream-segfault into master

Since musl 1.2.5, musl no longer provides a basename(3) prototype in string.h. Instead, in accordance with POSIX, musl requires libgen.h to be included for the basename function prototype. Unfortunately, ezstream does not include libgen.h on Linux (probably because they incorrectly assume it to be declared by string.h already).

This causes a -Wimplicit-function-declaration warning and this warning is by no means cosmetic as implicit function declaration can affect code generation and actually do affect it in this case. In this case, this causes a segfault in the ezstream test suite.

Fixing the implicit function declaration also fixes the segfault.

See also: https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7

Merge request reports