@@ -287,9 +287,11 @@ fn test_openbsd(target: &str) {
287287 cfg. flag ( "-Wno-deprecated-declarations" ) ;
288288
289289 headers ! { cfg:
290+ "elf.h" ,
290291 "errno.h" ,
291292 "fcntl.h" ,
292293 "limits.h" ,
294+ "link.h" ,
293295 "locale.h" ,
294296 "stddef.h" ,
295297 "stdint.h" ,
@@ -387,7 +389,9 @@ fn test_openbsd(target: &str) {
387389 cfg. type_name ( move |ty, is_struct, is_union| {
388390 match ty {
389391 // 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+ }
391395
392396 // OSX calls this something else
393397 "sighandler_t" => "sig_t" . to_string ( ) ,
@@ -870,9 +874,11 @@ fn test_netbsd(target: &str) {
870874
871875 headers ! {
872876 cfg:
877+ "elf.h" ,
873878 "errno.h" ,
874879 "fcntl.h" ,
875880 "limits.h" ,
881+ "link.h" ,
876882 "locale.h" ,
877883 "stddef.h" ,
878884 "stdint.h" ,
@@ -1633,6 +1639,7 @@ fn test_freebsd(target: &str) {
16331639 "ctype.h" ,
16341640 "dirent.h" ,
16351641 "dlfcn.h" ,
1642+ "elf.h" ,
16361643 "errno.h" ,
16371644 "fcntl.h" ,
16381645 "glob.h" ,
@@ -1641,6 +1648,7 @@ fn test_freebsd(target: &str) {
16411648 "langinfo.h" ,
16421649 "libutil.h" ,
16431650 "limits.h" ,
1651+ "link.h" ,
16441652 "locale.h" ,
16451653 "machine/reg.h" ,
16461654 "mqueue.h" ,
@@ -1709,7 +1717,8 @@ fn test_freebsd(target: &str) {
17091717 cfg. type_name ( move |ty, is_struct, is_union| {
17101718 match ty {
17111719 // 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 ( ) ,
17131722
17141723 // FIXME: https://github.com/rust-lang/libc/issues/1273
17151724 "sighandler_t" => "sig_t" . to_string ( ) ,
@@ -1909,6 +1918,10 @@ fn test_freebsd(target: &str) {
19091918 // `void*`:
19101919 ( "stack_t" , "ss_sp" ) if Some ( 10 ) == freebsd_ver => true ,
19111920
1921+ // There "p_type" macro defined in `resolv.h`.
1922+ ( "Elf32_Phdr" , "p_type" ) => true ,
1923+ ( "Elf64_Phdr" , "p_type" ) => true ,
1924+
19121925 _ => false ,
19131926 }
19141927 } ) ;
0 commit comments