Repository navigation
Conversation
A braced initializer without designators fills a union's first member, so the common 16-byte form of an IPv6 address did not compile here (too many initializers for 'uint16_t [8]'). FreeBSD, glibc and musl put the 16 bytes first. Size, layout and member names are unchanged.
This branch has not been deployed
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.
A braced initializer without designators fills a union's first member.
struct in6_addrhere starts withuint16_t __u6_addr16[8], so the common 16-byte form,{{{ 0x00, ..., 0xff, 0xff, 0x7f, 0x00, 0x00, 0x01 }}}, fails with "too many initializers for 'uint16_t [8]'". FreeBSD, glibc and musl all put the 16 bytes first. zpl-c/enet's dual-stack constants are one case that doesn't build because of it (PPSSPP's Switch libretro core, hrydgard/ppsspp#22153).This moves
s6_addrto the top of the union; size, layout and member names are unchanged. The only initializer of the type in libnx itself,in6addr_any = {0}, is the same either way.