File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,22 @@ pub const SIOCGIFINDEX: libc::c_ulong = 0x8933;
5
5
pub const ETH_P_ALL : libc:: c_short = 0x0003 ;
6
6
pub const ETH_P_IEEE802154 : libc:: c_short = 0x00F6 ;
7
7
8
- pub const TUNSETIFF : libc:: c_ulong = 0x400454CA ;
8
+ // Constant definition as per
9
+ // https://github.com/golang/sys/blob/master/unix/zerrors_linux_<arch>.go
10
+ pub const TUNSETIFF : libc:: c_ulong = if cfg ! ( any(
11
+ target_arch = "mips" ,
12
+ target_arch = "mips64" ,
13
+ target_arch = "mips64el" ,
14
+ target_arch = "mipsel" ,
15
+ target_arch = "powerpc" ,
16
+ target_arch = "powerpc64" ,
17
+ target_arch = "powerpc64le" ,
18
+ target_arch = "sparc64"
19
+ ) ) {
20
+ 0x800454CA
21
+ } else {
22
+ 0x400454CA
23
+ } ;
9
24
pub const IFF_TUN : libc:: c_int = 0x0001 ;
10
25
pub const IFF_TAP : libc:: c_int = 0x0002 ;
11
26
pub const IFF_NO_PI : libc:: c_int = 0x1000 ;
You can’t perform that action at this time.
0 commit comments