Bug 2142273
| Summary: | lvm2-2.03.14: daemons/lvmpolld/lvmpolld-core.c: strerror_r on musl libc always returns int | ||
|---|---|---|---|
| Product: | [Community] LVM and device-mapper | Reporter: | v |
| Component: | lvm2 | Assignee: | Zdenek Kabelac <zkabelac> |
| lvm2 sub component: | polldaemon | QA Contact: | cluster-qe <cluster-qe> |
| Status: | POST --- | Docs Contact: | |
| Severity: | high | ||
| Priority: | unspecified | CC: | agk, heinzm, jbrassow, msnitzer, okozina, prajnoha, zkabelac |
| Version: | unspecified | Flags: | pm-rhel:
lvm-technical-solution?
pm-rhel: lvm-test-coverage? |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Hmmm - seems like testing condition for _GNU_SOURCE could be improved and checked better if the system actually provides symbol in right variant. It's worth to note lvm2 project is only supported for glibc - that fact it mostly works with i.e. 'musl C library' is mostly due to support from users using it - i.e. we can apply patches - however we do not have any system with such library present. |
Description of problem: On musl libc *strerror_r* defined to return int even with _GNU_SOURCE: ``` /* /usr/include/string.h */ #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ || defined(_BSD_SOURCE) // ... int strerror_r (int, char *, size_t); // ... ``` this causes compilation error: ``` lvmpolld-core.c:56:9: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'const char *' [-Wint-conversion] return strerror_r(errnum, data->buf, sizeof(data->buf)); /* never returns NULL */ ``` Version-Release number of selected component (if applicable): 2.03.14 How reproducible: Always Steps to Reproduce: Try to build on musl libc Expected results: Successful build