@@ -13,7 +13,15 @@ import core.sys.posix.config;
13
13
14
14
public import core.sys.posix.netinet.in_ ;
15
15
16
- version (CRuntime_Glibc )
16
+ version (CRuntime_Glibc ) version = linux_libc;
17
+ else version (CRuntime_Musl ) version = linux_libc;
18
+ else version (CRuntime_Bionic ) version = linux_libc;
19
+ else version (CRuntime_UClibc ) version = linux_libc;
20
+
21
+ version (CRuntime_Glibc ) version = gnu_libc;
22
+ else version (CRuntime_UClibc ) version = gnu_libc;
23
+
24
+ version (linux_libc)
17
25
{
18
26
extern (C ) nothrow @nogc :
19
27
@@ -107,7 +115,7 @@ version(CRuntime_Glibc)
107
115
enum IN6ADDR_ANY_INIT = in6_addr.init;
108
116
enum IN6ADDR_LOOPBACK_INIT = in6_addr([0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ]);
109
117
110
- static if (__USE_MISC)
118
+ version (gnu_libc) static if (__USE_MISC)
111
119
{
112
120
struct ip_mreq
113
121
{
@@ -166,13 +174,13 @@ version(CRuntime_Glibc)
166
174
167
175
extern (D ) bool IN6_ARE_ADDR_EQUAL (in6_addr* a, in6_addr* b) pure @safe { return * a == * b; }
168
176
169
- static if (__USE_MISC)
177
+ version (gnu_libc) static if (__USE_MISC)
170
178
{
171
179
int bindresvport (int __sockfd, sockaddr_in* __sock_in);
172
180
int bindresvport6 (int __sockfd, sockaddr_in6* _);
173
181
}
174
182
175
- static if (__USE_GNU)
183
+ version (gnu_libc) static if (__USE_GNU)
176
184
{
177
185
struct in6_pktinfo
178
186
{
@@ -246,7 +254,7 @@ version(CRuntime_Glibc)
246
254
enum IP_DROP_SOURCE_MEMBERSHIP = 40 ;
247
255
enum IP_MSFILTER = 41 ;
248
256
249
- static if (__USE_MISC)
257
+ version (gnu_libc) static if (__USE_MISC)
250
258
{
251
259
enum MCAST_JOIN_GROUP = 42 ;
252
260
enum MCAST_BLOCK_SOURCE = 43 ;
@@ -299,7 +307,7 @@ version(CRuntime_Glibc)
299
307
enum IP_DEFAULT_MULTICAST_LOOP = 1 ;
300
308
enum IP_MAX_MEMBERSHIPS = 20 ;
301
309
302
- static if (__USE_MISC)
310
+ version (gnu_libc) static if (__USE_MISC)
303
311
{
304
312
struct ip_opts
305
313
{
0 commit comments