Skip to content

main/elfutils: link against libintl for gettext support

Sören Tempel requested to merge nmeum/aports:elfutils-libintl into master

Without this commit, a dummy header for libintl.h is provided. Since this dummy header doesn't declare expected functions (like ngettext) these are declared implicitly with an int return type by the C compiler.

This causes compile warnings such as the following:

readelf.c:5412:11: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
 5412 |   printf (ngettext ("\
      |           ^~~~~~~~~~~~
      |           |
      |           int

Since we ignore the warnings this results in a segfault at run-time.

Fixes #14106 (closed)

Merge request reports