Skip to content

Commit

Permalink
gio/socket: Replace c_int import with full qualifier
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui authored and sdroege committed Apr 8, 2024
1 parent 79b627e commit ba8bd34
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions gio/src/socket.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Take a look at the license at the top of the repository in the LICENSE file.

#[cfg(not(unix))]
use std::os::raw::c_int;
#[cfg(unix)]
use std::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
#[cfg(windows)]
Expand Down Expand Up @@ -769,12 +767,12 @@ impl<O: IsA<Socket>> SocketExtManual for O {}

#[cfg(all(docsrs, not(unix)))]
pub trait IntoRawFd {
fn into_raw_fd(self) -> c_int;
fn into_raw_fd(self) -> libc::c_int;
}

#[cfg(all(docsrs, not(unix)))]
pub trait FromRawFd {
unsafe fn from_raw_fd(fd: c_int) -> Self;
unsafe fn from_raw_fd(fd: libc::c_int) -> Self;
}

#[cfg(all(docsrs, not(unix)))]
Expand All @@ -783,7 +781,7 @@ pub trait AsRawFd {
}

#[cfg(all(docsrs, not(unix)))]
pub type RawFd = c_int;
pub type RawFd = libc::c_int;

#[cfg(all(docsrs, not(windows)))]
pub trait IntoRawSocket {
Expand Down

0 comments on commit ba8bd34

Please sign in to comment.