Disable use of undefined DEF_WEAK macro in strptime.c#1058
Open
berrange wants to merge 1 commit intointel:mainfrom
Open
Disable use of undefined DEF_WEAK macro in strptime.c#1058berrange wants to merge 1 commit intointel:mainfrom
berrange wants to merge 1 commit intointel:mainfrom
Conversation
The strptime.c code invokes, what is presumably an undefined macro
called, DEF_WEAK. The compiler can't resolve this to a function, so
being traditional C, it invents a function taking arbitrary args and
returning an int.
GCC 9.5.0 used in the reproducible build warns about this problem
but sdk/Makefile.source is throwing stderr from the tlibc build
by sending it all to /dev/null, so the warning is never seen.
time/strptime.c:92:1: warning: data definition has no type or storage class
92 | DEF_WEAK(strptime);
| ^~~~~~~~
time/strptime.c:92:1: warning: type defaults to 'int' in declaration of 'DEF_WEAK' [-Wimplicit-int]
time/strptime.c:92:1: warning: parameter names (without types) in function declaration
New GCC 14 has turned this warning into a fatal error, such that
this bug breaks the build outside of the NixOS envirnoment.
The other use of DEF_WEAK in tlibc/time/localtime.c was surrounded
by '#if 0', so do the same in strptime.c
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
Issue I found to be closed if PR will be accepted #1066 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The strptime.c code invokes, what is presumably an undefined macro called, DEF_WEAK. The compiler can't resolve this to a function, so being traditional C, it invents a function taking arbitrary args and returning an int.
GCC 9.5.0 used in the reproducible build warns about this problem but sdk/Makefile.source is throwing stderr from the tlibc build by sending it all to /dev/null, so the warning is never seen.
New GCC 14 has turned this warning into a fatal error, such that this bug breaks the build outside of the NixOS envirnoment.
The other use of DEF_WEAK in tlibc/time/localtime.c was surrounded by '#if 0', so do the same in strptime.c