Open
Conversation
…common by default.
diatomic-ge
added a commit
to diatomic-ge/HellCore
that referenced
this pull request
Aug 5, 2022
Previously, there were technically definitions for Dev_Random in both server.c and numbers.c, as well as everywhere else that included server.h. GCC seems to've either been previously correcting or masking this issue, or perhaps Dev_Random just doesn't get used in practice outside of where it's set in server.c, so it never had a chance to cause issues. At some point, GCC switched to not silently merging the conflicting definitions without -fcommon, which isn't recommended to use in practice. Whatever the case, set the declaration in server.h extern, remove unnecessary declaractions, and actually define Dev_Random in server.c (to match server.h) so that there is one definition that is referenced everywhere. Fixes necanthrope#9
diatomic-ge
added a commit
to diatomic-ge/HellCore
that referenced
this pull request
Oct 5, 2022
Previously, there were technically definitions for Dev_Random in both server.c and numbers.c, as well as everywhere else that included server.h. GCC seems to've either been previously correcting or masking this issue, or perhaps Dev_Random just doesn't get used in practice outside of where it's set in server.c, so it never had a chance to cause issues. At some point, GCC switched to not silently merging the conflicting definitions without -fcommon, which isn't recommended to use in practice. Whatever the case, set the declaration in server.h extern, remove unnecessary declaractions, and actually define Dev_Random in server.c (to match server.h) so that there is one definition that is referenced everywhere. Fixes necanthrope#9
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.
GCC versions above 10.0 use -fno-common instead of -fcommon. The change in default operation for GCC 10 prevented the project from building because of how the Dev_Random file pointer was defined, as it was being defined multiple times per the compiler.