Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ targets = [
]

[dependencies]
libc = { version = "=0.2.175", features = ["extra_traits"] }
libc = { version = "=0.2.180", features = ["extra_traits"] }
bitflags = "2.3.3"
cfg-if = "1.0"
pin-utils = { version = "0.1.0", optional = true }
Expand Down
1 change: 1 addition & 0 deletions changelog/2724.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bumped libc to [0.2.180](https://github.com/rust-lang/libc/releases/tag/0.2.180)
1 change: 1 addition & 0 deletions changelog/2724.removed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed `IFF_NOTRAILERS` by NetBSD, as it has been removed upstream and from libc
1 change: 0 additions & 1 deletion src/net/if_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ libc_bitflags!(
solarish,
apple_targets,
target_os = "fuchsia",
target_os = "netbsd",
target_os = "cygwin"))]
IFF_NOTRAILERS as IflagsType;
/// Interface manages own routes.
Expand Down
9 changes: 2 additions & 7 deletions src/sys/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ impl Kqueue {
}
}

#[cfg(any(freebsdlike, apple_targets, target_os = "openbsd"))]
type type_of_udata = *mut libc::c_void;
#[cfg(target_os = "netbsd")]
type type_of_udata = intptr_t;

#[cfg(target_os = "netbsd")]
type type_of_event_filter = u32;
#[cfg(not(target_os = "netbsd"))]
Expand Down Expand Up @@ -364,7 +359,7 @@ impl KEvent {
fflags: fflags.bits(),
// data can be either i64 or intptr_t, depending on platform
data: data as _,
udata: udata as type_of_udata,
udata: udata as *mut libc::c_void,
..unsafe { mem::zeroed() }
},
}
Expand Down Expand Up @@ -456,5 +451,5 @@ pub fn ev_set(
ev.kevent.flags = flags.bits();
ev.kevent.fflags = fflags.bits();
ev.kevent.data = 0;
ev.kevent.udata = udata as type_of_udata;
ev.kevent.udata = udata as *mut libc::c_void;
}
8 changes: 8 additions & 0 deletions src/sys/termios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,14 @@ libc_bitflags! {
ICRNL;
IXON;
IXOFF;
#[cfg(any(linux_android,
target_os = "aix",
target_os = "cygwin",
target_os = "haiku",
target_os = "hurd",
target_os = "nto",
solarish))]
IUCLC;
#[cfg(not(target_os = "redox"))]
IXANY;
#[cfg(not(any(target_os = "redox", target_os = "haiku")))]
Expand Down
8 changes: 8 additions & 0 deletions src/sys/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,10 @@ impl TimeVal {
})
}

#[cfg_attr(
any(target_env = "musl", target_env = "ohos"),
allow(deprecated)
)] // https://github.com/rust-lang/libc/issues/1848
fn micros_mod_sec(&self) -> suseconds_t {
if self.tv_sec() < 0 && self.tv_usec() > 0 {
self.tv_usec() - MICROS_PER_SEC as suseconds_t
Expand All @@ -640,6 +644,10 @@ impl TimeVal {
self.0.tv_sec
}

#[cfg_attr(
any(target_env = "musl", target_env = "ohos"),
allow(deprecated)
)] // https://github.com/rust-lang/libc/issues/1848
pub const fn tv_usec(&self) -> suseconds_t {
self.0.tv_usec
}
Expand Down
Loading