Fix building on systems with musl#10
Merged
rsmarples merged 1 commit intoNetworkConfiguration:masterfrom Oct 20, 2019
Merged
Conversation
rsmarples
reviewed
Oct 19, 2019
|
|
||
| #include <arpa/inet.h> | ||
| #include <net/if.h> | ||
| #if defined(__GLIBC__) |
Member
There was a problem hiding this comment.
Could you move thism block to after the network headers and before errno.h with whitespace and a comment to say it's needed for musl?
Thanks
Contributor
Author
There was a problem hiding this comment.
Sure thing... I've made the request changes. Let me know if you need any other modifications.
rsmarples
requested changes
Oct 20, 2019
src/if-linux.c
Outdated
| #include <netinet/in.h> | ||
| #include <net/route.h> | ||
|
|
||
| /* Needed to support compiling with musl */ |
Member
There was a problem hiding this comment.
Please change this comment to your initial commit comment has it has more value:
musl has its own definition of struct ethhdr, so only include
netinet/if_ether.h on systems with GLIBC.
For the ARPHDR constants, we must include linux/if_arp.h instead.
Contributor
Author
There was a problem hiding this comment.
Ok, I have changed the comment.
musl has its own definition of struct ethhdr, so only include netinet/if_ether.h on systems with GLIBC. For the ARPHDR constants, we must include linux/if_arp.h instead.
rsmarples
pushed a commit
that referenced
this pull request
Jan 25, 2021
musl has its own definition of struct ethhdr, so only include netinet/if_ether.h on systems with GLIBC. For the ARPHDR constants, we must include linux/if_arp.h instead.
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.
musl has its own definition of struct ethhdr, so only include netinet/if_ether.h on systems with GLIBC. For the ARPHDR constants, we must include linux/if_arp.h instead.
This patch was used downstream in void-linux/void-packages#15616.