Skip to content

Commit 3c9376d

Browse files
committed
Auto merge of #1366 - Susurrus:iff_constants, r=gnzlbg
Change datatype for some IFF_ constants These were originally added as c_short types, but all other IFF_ constants are c_int. This commit changes them to match all the other constants for consistency. Closes #915
2 parents b722d8c + 3408a6a commit 3c9376d

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/unix/notbsd/linux/mod.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,25 +1059,25 @@ pub const IFLA_QDISC: ::c_ushort = 6;
10591059
pub const IFLA_STATS: ::c_ushort = 7;
10601060

10611061
// linux/if_tun.h
1062-
pub const IFF_TUN: ::c_short = 0x0001;
1063-
pub const IFF_TAP: ::c_short = 0x0002;
1064-
pub const IFF_NO_PI: ::c_short = 0x1000;
1062+
pub const IFF_TUN: ::c_int = 0x0001;
1063+
pub const IFF_TAP: ::c_int = 0x0002;
1064+
pub const IFF_NO_PI: ::c_int = 0x1000;
10651065
// Read queue size
10661066
pub const TUN_READQ_SIZE: ::c_short = 500;
10671067
// TUN device type flags: deprecated. Use IFF_TUN/IFF_TAP instead.
1068-
pub const TUN_TUN_DEV: ::c_short = ::IFF_TUN;
1069-
pub const TUN_TAP_DEV: ::c_short = ::IFF_TAP;
1068+
pub const TUN_TUN_DEV: ::c_short = ::IFF_TUN as ::c_short;
1069+
pub const TUN_TAP_DEV: ::c_short = ::IFF_TAP as ::c_short;
10701070
pub const TUN_TYPE_MASK: ::c_short = 0x000f;
10711071
// This flag has no real effect
1072-
pub const IFF_ONE_QUEUE: ::c_short = 0x2000;
1073-
pub const IFF_VNET_HDR: ::c_short = 0x4000;
1074-
pub const IFF_TUN_EXCL: ::c_short = 0x8000;
1075-
pub const IFF_MULTI_QUEUE: ::c_short = 0x0100;
1076-
pub const IFF_ATTACH_QUEUE: ::c_short = 0x0200;
1077-
pub const IFF_DETACH_QUEUE: ::c_short = 0x0400;
1072+
pub const IFF_ONE_QUEUE: ::c_int = 0x2000;
1073+
pub const IFF_VNET_HDR: ::c_int = 0x4000;
1074+
pub const IFF_TUN_EXCL: ::c_int = 0x8000;
1075+
pub const IFF_MULTI_QUEUE: ::c_int = 0x0100;
1076+
pub const IFF_ATTACH_QUEUE: ::c_int = 0x0200;
1077+
pub const IFF_DETACH_QUEUE: ::c_int = 0x0400;
10781078
// read-only flag
1079-
pub const IFF_PERSIST: ::c_short = 0x0800;
1080-
pub const IFF_NOFILTER: ::c_short = 0x1000;
1079+
pub const IFF_PERSIST: ::c_int = 0x0800;
1080+
pub const IFF_NOFILTER: ::c_int = 0x1000;
10811081

10821082
pub const ST_RDONLY: ::c_ulong = 1;
10831083
pub const ST_NOSUID: ::c_ulong = 2;

0 commit comments

Comments
 (0)