network: prevent redefinition error when building with musl libc #344
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.
musl libc has its own
ethhdr
struct that is always defined in <netinet/ether.h>. Normally, "nm-default.h" prevents the redefinition ofethhdr
if that struct is already defined, but because "nm-default.h" comes before <netinet/ether.h>, it will define the struct, causing a redefinition error.The patch for this comes from Void Linux, and I am a Chimera Linux packager.