-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix build with clang 16 #43
base: master
Are you sure you want to change the base?
Conversation
Clang 16 (and likely GCC 13) enables -Wimplicit-function-declaration by default. This results in errors such as: signify.c:144:6: error: call to undeclared function 'b64_pton'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 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] 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] if ((rv = b64_pton(hash, data, sizeof(data))) == -1) A simple fix is to create a base64.h file containing the headers of the b64_* functions. Bug: https://bugs.gentoo.org/894354 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Upstream PR: aperezdc/signify#43 Closes: https://bugs.gentoo.org/894354 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Upstream PR: aperezdc/signify#43 Closes: https://bugs.gentoo.org/894354 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: #32097 Signed-off-by: Michał Górny <mgorny@gentoo.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be easier to add the function prototypes to compat.h
, which would avoid needing to carry modifications of the original source files.
@listout Could you update the PR with this suggestion? Thanks in advance.
@@ -34,6 +34,7 @@ | |||
#include "sha2.h" | |||
|
|||
#include "crypto_api.h" | |||
#include "base64.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding a new header, wouldn't it be enough to add the function prototypes to compat.h
?
Clang 16 (and likely GCC 13) enables -Wimplicit-function-declaration by default. This results in errors such as:
signify.c:144:6: error: call to undeclared function 'b64_pton'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
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]
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]
if ((rv = b64_pton(hash, data, sizeof(data))) == -1)
A simple fix is to create a base64.h file containing the headers of the b64_* functions.
Bug: https://bugs.gentoo.org/894354