-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IFF_*
constants to linux, android and fuchsia
#916
Conversation
57d09db
to
9927908
Compare
Thanks! Unfortunately we can't change the types as that'd be a breaking change, but the additions are certainly possible! |
9ea9d37
to
ae1b5f7
Compare
@alexcrichton ok, updated. |
src/unix/notbsd/mod.rs
Outdated
@@ -445,6 +445,16 @@ pub const IFF_PORTSEL: ::c_int = 0x2000; | |||
pub const IFF_AUTOMEDIA: ::c_int = 0x4000; | |||
pub const IFF_DYNAMIC: ::c_int = 0x8000; | |||
|
|||
cfg_if! { | |||
if #[cfg(target_os = "android")] { | |||
pub const IFF_TUN: ::c_int = 0x0001; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could these be moved into the android folder to avoid the cfg_if!
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, no problem.
by the way, should keep IFF_TUN/IFF_TAP/IFF_NO_PI
type is same as linux ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah I think it's fine to fix the type for new definitions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, updated.
@alexcrichton Done. |
@bors: r+ |
📌 Commit 0f4ae0b has been approved by |
Add `IFF_*` constants to linux, android and fuchsia Add constants to android and fuchsia: * IFF_TUN * IFF_TAP * IFF_NO_PI Type problem: #915 so change constants type `libc::c_short` to `libc::c_int` : * IFF_*
☀️ Test successful - status-appveyor, status-travis |
Add constants to android and fuchsia:
Type problem: #915
so change constants type
libc::c_short
tolibc::c_int
: