@@ -251,9 +251,12 @@ fn main() {
251
251
if linux || android {
252
252
cfg. header ( "sys/fsuid.h" ) ;
253
253
254
- // DCCP support
255
254
if !uclibc && !musl && !emscripten {
255
+ // DCCP support
256
256
cfg. header ( "linux/dccp.h" ) ;
257
+
258
+ // SCTP support
259
+ //cfg.header("netinet/sctp.h");
257
260
}
258
261
259
262
if !musl || mips {
@@ -275,6 +278,9 @@ fn main() {
275
278
cfg. header ( "sys/ipc.h" ) ;
276
279
cfg. header ( "sys/msg.h" ) ;
277
280
cfg. header ( "sys/shm.h" ) ;
281
+
282
+ // SCTP support
283
+ cfg. header ( "netinet/sctp.h" ) ;
278
284
}
279
285
280
286
if netbsd {
@@ -284,6 +290,9 @@ fn main() {
284
290
285
291
// DCCP support
286
292
cfg. header ( "netinet/dccp.h" ) ;
293
+
294
+ // SCTP support
295
+ cfg. header ( "netinet/sctp.h" ) ;
287
296
}
288
297
289
298
if openbsd {
@@ -369,6 +378,8 @@ fn main() {
369
378
"type_" if linux &&
370
379
( struct_ == "input_event" || struct_ == "input_mask" ||
371
380
struct_ == "ff_effect" ) => "type" . to_string ( ) ,
381
+ "type_" if freebsd &&
382
+ ( struct_ == "sctp_error_missing_param" ) => "type" . to_string ( ) ,
372
383
s => s. to_string ( ) ,
373
384
}
374
385
} ) ;
@@ -378,6 +389,12 @@ fn main() {
378
389
// sighandler_t is crazy across platforms
379
390
"sighandler_t" => true ,
380
391
392
+ // Temporarily skip the 'sctp_nets' type for FreeBSD,
393
+ // it's currently just an alias for c_void since the true
394
+ // type layout is very complex and it's only ever used
395
+ // through a pointer (e.g. sctp_nets*).
396
+ "sctp_nets" if freebsd => true ,
397
+
381
398
_ => false
382
399
}
383
400
} ) ;
@@ -410,6 +427,9 @@ fn main() {
410
427
// header conflicts when including them with all the other structs.
411
428
"termios2" => true ,
412
429
430
+ // This was added in FreeBSD 11
431
+ "sctp_error_auth_invalid_hmac" if freebsd => true ,
432
+
413
433
_ => false
414
434
}
415
435
} ) ;
@@ -480,6 +500,14 @@ fn main() {
480
500
"HW_MAXID" |
481
501
"USER_MAXID" if freebsd => true ,
482
502
503
+ // These constants were added in FreeBSD 11.
504
+ "SCTP_INTERLEAVING_SUPPORTED" |
505
+ "SCTP_IDATA" |
506
+ "SCTP_IFORWARD_CUM_TSN" |
507
+ "SCTP_PR_SCTP_PRIO" |
508
+ "SCTP_ASSOC_SUPPORTS_INTERLEAVING" |
509
+ "SCTP_NOHEARTBEAT" if freebsd => true ,
510
+
483
511
// These OSX constants are removed in Sierra.
484
512
// https://developer.apple.com/library/content/releasenotes/General/APIDiffsMacOS10_12/Swift/Darwin.html
485
513
"KERN_KDENABLE_BG_TRACE" if apple => true ,
@@ -709,7 +737,9 @@ fn main() {
709
737
// musl seems to define this as an *anonymous* bitfield
710
738
( musl && struct_ == "statvfs" && field == "__f_unused" ) ||
711
739
// sigev_notify_thread_id is actually part of a sigev_un union
712
- ( struct_ == "sigevent" && field == "sigev_notify_thread_id" )
740
+ ( struct_ == "sigevent" && field == "sigev_notify_thread_id" ) ||
741
+ // Added in FreeBSD 11, which isn't yet supported by the libc CI
742
+ ( freebsd && struct_ == "sctp_error_missing_param" && field == "type" )
713
743
} ) ;
714
744
715
745
cfg. fn_cname ( move |name, cname| {
0 commit comments