Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38420 )
Change subject: commonlib: Add commonlib/bsd ......................................................................
Patch Set 5:
Patch Set 5:
This patch leads to a compile failure with glibc-headers-2.12-1.212 (currently installed on one of my systems) due to old endian.h in this package.
Is it missing le32toh()? I intentionally tried to standardize on something that I thought would be more widely available with this new commonlib/bsd code (as opposed to things like le32_to_cpu() which we also have in coreboot but I think are less widespread).
AFAIK there's no fully official POSIX API for little-endian stuff (only ntohl() for big-endian), so I think this is the next best thing we can try to rely on. Is this a big problem or are you okay with just requiring the newer version?
Yes, it is related to le16toh() and le32toh():
src/commonlib/bsd/lz4_wrapper.c:15:9: error: implicit declaration of function 'le16toh' [-Werror=implicit-function-declaration]
coreboot/src/commonlib/bsd/lz4_wrapper.c:117:7: error: implicit declaration of function 'le32toh' [-Werror=implicit-function-declaration]
Unfortunately I cannot simply update the to the needed glibc version on this machine. Do you have any approaches that could fix this issue while still stay maintainable?