-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
On Chimera Linux, the build fails with
signify.c:144:6: error: call to undeclared function 'b64_pton'; ISO C99 and
later do not support implicit function declarations [-Wimplicit-function-declaration]
144 | if (b64_pton(commentend + 1, buf, buflen) != buflen)
| ^
signify.c:231:6: error: call to undeclared function 'b64_ntop'; ISO C99 and
later do not support implicit function declarations [-Wimplicit-function-declaration]
231 | if (b64_ntop(buf, buflen, b64, sizeof(b64)) == -1)
| ^
signify.c:624:12: error: call to undeclared function 'b64_pton'; ISO C99 and
later do not support implicit function declarations [-Wimplicit-function-declaration]
624 | if ((rv = b64_pton(hash, data, sizeof(data))) == -1)
| ^
I see that somebody else had the same issue in #43, which seems stale. The proposed solution of adding the headers to compat.h works, but I got curious as to why it was working on a glibc system with the same compiler. It turns out that glibc's resolv.h has the same lineage as OpenBSD's and exports the relevant headers by chance, while musl's resolv.h does not. (Why it is that the base64 function headers are in resolv.h in the first place is a mystery to me.)
So that's why the build works on glibc systems even with -Wimplicit-function-declaration. Adding the headers to compat.h fixes this. I'll write a PR with the relevant changes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels