@@ -1995,6 +1995,10 @@ fn test_linux(target: &str) {
1995
1995
) ,
1996
1996
}
1997
1997
1998
+ let arm = target. contains ( "arm" ) ;
1999
+ let x86_64 = target. contains ( "x86_64" ) ;
2000
+ let x86_32 = target. contains ( "i686" ) ;
2001
+ let x32 = target. contains ( "x32" ) ;
1998
2002
let mips = target. contains ( "mips" ) ;
1999
2003
let mips32 = mips && !target. contains ( "64" ) ;
2000
2004
@@ -2097,23 +2101,26 @@ fn test_linux(target: &str) {
2097
2101
2098
2102
// `sys/io.h` is only available on x86*, Alpha, IA64, and 32-bit ARM:
2099
2103
// https://bugzilla.redhat.com/show_bug.cgi?id=1116162
2100
- if target. contains ( "x86" )
2101
- || target. contains ( "i686" )
2102
- || target. contains ( "arm" )
2103
- {
2104
+ if x86_64 || x86_32 || arm {
2104
2105
headers ! { cfg: "sys/io.h" }
2105
2106
}
2106
2107
2107
2108
// `sys/reg.h` is only available on x86 and x86_64
2108
- if target . contains ( "x86" ) || target . contains ( "i686" ) {
2109
+ if x86_64 || x86_32 {
2109
2110
headers ! { cfg: "sys/reg.h" }
2110
2111
}
2111
2112
2112
2113
// sysctl system call is unsupported in x32 kernel:
2113
- if !target . contains ( "x32" ) {
2114
+ if !x86_64_32 {
2114
2115
headers ! { cfg: "sys/sysctl.h" }
2115
2116
}
2116
2117
2118
+ // <execinfo.h> is not supported by musl:
2119
+ // https://www.openwall.com/lists/musl/2015/04/09/3
2120
+ if !musl {
2121
+ headers ! { cfg: "execinfo.h" }
2122
+ }
2123
+
2117
2124
// Include linux headers at the end:
2118
2125
headers ! {
2119
2126
cfg:
0 commit comments