@@ -244,9 +244,12 @@ fn main() {
244
244
if linux || android {
245
245
cfg. header ( "sys/fsuid.h" ) ;
246
246
247
- // DCCP support
248
247
if !uclibc && !musl && !emscripten {
248
+ // DCCP support
249
249
cfg. header ( "linux/dccp.h" ) ;
250
+
251
+ // SCTP support
252
+ //cfg.header("netinet/sctp.h");
250
253
}
251
254
}
252
255
@@ -258,6 +261,9 @@ fn main() {
258
261
cfg. header ( "sys/ipc.h" ) ;
259
262
cfg. header ( "sys/msg.h" ) ;
260
263
cfg. header ( "sys/shm.h" ) ;
264
+
265
+ // SCTP support
266
+ cfg. header ( "netinet/sctp.h" ) ;
261
267
}
262
268
263
269
if netbsd {
@@ -267,6 +273,9 @@ fn main() {
267
273
268
274
// DCCP support
269
275
cfg. header ( "netinet/dccp.h" ) ;
276
+
277
+ // SCTP support
278
+ cfg. header ( "netinet/sctp.h" ) ;
270
279
}
271
280
272
281
if openbsd {
@@ -343,6 +352,8 @@ fn main() {
343
352
"type_" if linux &&
344
353
( struct_ == "input_event" || struct_ == "input_mask" ||
345
354
struct_ == "ff_effect" ) => "type" . to_string ( ) ,
355
+ "type_" if freebsd &&
356
+ ( struct_ == "sctp_error_missing_param" ) => "type" . to_string ( ) ,
346
357
s => s. to_string ( ) ,
347
358
}
348
359
} ) ;
@@ -352,6 +363,12 @@ fn main() {
352
363
// sighandler_t is crazy across platforms
353
364
"sighandler_t" => true ,
354
365
366
+ // Temporarily skip the 'sctp_nets' type for FreeBSD,
367
+ // it's currently just an alias for c_void since the true
368
+ // type layout is very complex and it's only ever used
369
+ // through a pointer (e.g. sctp_nets*).
370
+ "sctp_nets" if freebsd => true ,
371
+
355
372
_ => false
356
373
}
357
374
} ) ;
@@ -384,6 +401,9 @@ fn main() {
384
401
// header conflicts when including them with all the other structs.
385
402
"termios2" => true ,
386
403
404
+ // This was added in FreeBSD 11
405
+ "sctp_error_auth_invalid_hmac" if freebsd => true ,
406
+
387
407
_ => false
388
408
}
389
409
} ) ;
@@ -452,6 +472,14 @@ fn main() {
452
472
"HW_MAXID" |
453
473
"USER_MAXID" if freebsd => true ,
454
474
475
+ // These constants were added in FreeBSD 11.
476
+ "SCTP_INTERLEAVING_SUPPORTED" |
477
+ "SCTP_IDATA" |
478
+ "SCTP_IFORWARD_CUM_TSN" |
479
+ "SCTP_PR_SCTP_PRIO" |
480
+ "SCTP_ASSOC_SUPPORTS_INTERLEAVING" |
481
+ "SCTP_NOHEARTBEAT" if freebsd => true ,
482
+
455
483
// These OSX constants are removed in Sierra.
456
484
// https://developer.apple.com/library/content/releasenotes/General/APIDiffsMacOS10_12/Swift/Darwin.html
457
485
"KERN_KDENABLE_BG_TRACE" if apple => true ,
0 commit comments