@@ -287,9 +287,11 @@ fn test_openbsd(target: &str) {
287
287
cfg. flag ( "-Wno-deprecated-declarations" ) ;
288
288
289
289
headers ! { cfg:
290
+ "elf.h" ,
290
291
"errno.h" ,
291
292
"fcntl.h" ,
292
293
"limits.h" ,
294
+ "link.h" ,
293
295
"locale.h" ,
294
296
"stddef.h" ,
295
297
"stdint.h" ,
@@ -387,7 +389,9 @@ fn test_openbsd(target: &str) {
387
389
cfg. type_name ( move |ty, is_struct, is_union| {
388
390
match ty {
389
391
// Just pass all these through, no need for a "struct" prefix
390
- "FILE" | "DIR" | "Dl_info" => ty. to_string ( ) ,
392
+ "FILE" | "DIR" | "Dl_info" | "Elf32_Phdr" | "Elf64_Phdr" => {
393
+ ty. to_string ( )
394
+ }
391
395
392
396
// OSX calls this something else
393
397
"sighandler_t" => "sig_t" . to_string ( ) ,
@@ -870,9 +874,11 @@ fn test_netbsd(target: &str) {
870
874
871
875
headers ! {
872
876
cfg:
877
+ "elf.h" ,
873
878
"errno.h" ,
874
879
"fcntl.h" ,
875
880
"limits.h" ,
881
+ "link.h" ,
876
882
"locale.h" ,
877
883
"stddef.h" ,
878
884
"stdint.h" ,
@@ -1633,6 +1639,7 @@ fn test_freebsd(target: &str) {
1633
1639
"ctype.h" ,
1634
1640
"dirent.h" ,
1635
1641
"dlfcn.h" ,
1642
+ "elf.h" ,
1636
1643
"errno.h" ,
1637
1644
"fcntl.h" ,
1638
1645
"glob.h" ,
@@ -1641,6 +1648,7 @@ fn test_freebsd(target: &str) {
1641
1648
"langinfo.h" ,
1642
1649
"libutil.h" ,
1643
1650
"limits.h" ,
1651
+ "link.h" ,
1644
1652
"locale.h" ,
1645
1653
"machine/reg.h" ,
1646
1654
"mqueue.h" ,
@@ -1709,7 +1717,8 @@ fn test_freebsd(target: &str) {
1709
1717
cfg. type_name ( move |ty, is_struct, is_union| {
1710
1718
match ty {
1711
1719
// Just pass all these through, no need for a "struct" prefix
1712
- "FILE" | "fd_set" | "Dl_info" | "DIR" => ty. to_string ( ) ,
1720
+ "FILE" | "fd_set" | "Dl_info" | "DIR" | "Elf32_Phdr"
1721
+ | "Elf64_Phdr" => ty. to_string ( ) ,
1713
1722
1714
1723
// FIXME: https://github.com/rust-lang/libc/issues/1273
1715
1724
"sighandler_t" => "sig_t" . to_string ( ) ,
@@ -1909,6 +1918,10 @@ fn test_freebsd(target: &str) {
1909
1918
// `void*`:
1910
1919
( "stack_t" , "ss_sp" ) if Some ( 10 ) == freebsd_ver => true ,
1911
1920
1921
+ // There "p_type" macro defined in `resolv.h`.
1922
+ ( "Elf32_Phdr" , "p_type" ) => true ,
1923
+ ( "Elf64_Phdr" , "p_type" ) => true ,
1924
+
1912
1925
_ => false ,
1913
1926
}
1914
1927
} ) ;
0 commit comments