Summary: | Incompatible with MUSL libc: strerror_r | ||
---|---|---|---|
Product: | elfutils | Reporter: | Luiz Angelo Daros de Luca <luizluca> |
Component: | general | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | elfutils-devel, florian, mark, ross, sam, wcventure |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Bug Depends on: | |||
Bug Blocks: | 21002 |
Description
Luiz Angelo Daros de Luca
2016-12-30 21:13:54 UTC
strerror_r is marked with __must_check on glibc, and this leads to the following warnings/errors (with Werror): dwfl_error.c: In function 'dwfl_errmsg': dwfl_error.c:158:18: error: ignoring return value of 'strerror_r', declared with attribute warn_unused_result [-Werror=unused-result] strerror_r (error & 0xffff, s, sizeof(s)); ^ cc1: all warnings being treated as errors (In reply to Florian Fainelli from comment #1) > strerror_r is marked with __must_check on glibc, and this leads to the > following warnings/errors (with Werror): Sorry, not __must_check, but the return value becomes unused here. commit 8db222e36ae777e6aec8c61c616838a86258e99f Author: Érico Rolim <erico.erc@gmail.com> Date: Mon Feb 1 21:16:56 2021 -0300 libdwfl: use GNU strerror_r only when available. Some C libraries don't provide the GNU version of strerror_r, only the XSI-compliant one. We use the GNU version when available, since it fits the code better, and otherwise use the XSI-compliant one. https://sourceware.org/bugzilla/show_bug.cgi?id=21010 Signed-off-by: Érico Rolim <erico.erc@gmail.com> |