https://issues.dlang.org/show_bug.cgi?id=17666
Jonathan M Davis <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |m --- Comment #4 from Jonathan M Davis <[email protected]> --- (In reply to Sebastiaan Koppe from comment #3) > (In reply to Sebastiaan Koppe from comment #2) > > Just so that you know, I am working on a PR to add them to druntime. > > I am a bit stuck on the issue. > > In src/core/sys/posix/netinet/in_.d there are 2 general sections, one for > ipv4 and one for ipv6. In each section constants are defined for > CRuntime_Glibc, Darwin, FreeBSD, NetBSD, Solaris and linux (in that order). > Except there is no linux version for ipv6. > > Which makes me wonder how things for linux can actually compile, since basic > things like in6_addr and sockaddr_in6 structures are not defined. > > I suppose the CRuntime_Glibc branch is taken, but that would be invalid > since the constants differ slightly with linux. Well, AFAIK, basically every linux distro uses glibc, so CRuntime_Glibc is what would be used. It's Android that wouldn't use it, and I believe that it uses CRuntime_Bionic. The way that the IPv4 portion is a bit odd though, since it doesn't include CRuntime_Bionic, so I guess that Android would use the linux section in that case whereas any other linux would use CRuntime_Glibc. And in the IPv6 section, it uses CRuntime_Bionic instead of linux. So, I suspect that the fact that version(linux) is used in there at all is a bug, but I don't know. Regardless, for any normal linux system, both the IPv4 and IPv6 stuff is defined. --
