Skip to content

Commit 981b07e

Browse files
Use libc constants
1 parent ac7b1d5 commit 981b07e

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ targets = [
2828
]
2929

3030
[dependencies]
31-
libc = { version = "0.2.147", features = ["extra_traits"] }
31+
libc = { version = "0.2.148", features = ["extra_traits"] }
3232
bitflags = "2.3.1"
3333
cfg-if = "1.0"
3434
pin-utils = { version = "0.1.0", optional = true }

src/sys/socket/mod.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -890,13 +890,6 @@ pub struct Timestamps {
890890
pub hw_raw: TimeSpec,
891891
}
892892

893-
// Defined in `linux/tls.h`
894-
#[cfg(all(target_os = "linux"))]
895-
const TLS_GET_RECORD_TYPE: c_int = 2;
896-
897-
#[cfg(all(target_os = "linux"))]
898-
const SOL_TLS: c_int = 282;
899-
900893
impl ControlMessageOwned {
901894
/// Decodes a `ControlMessageOwned` from raw bytes.
902895
///
@@ -1040,7 +1033,7 @@ impl ControlMessageOwned {
10401033
ControlMessageOwned::Ipv6OrigDstAddr(dl)
10411034
},
10421035
#[cfg(all(target_os = "linux"))]
1043-
(SOL_TLS, TLS_GET_RECORD_TYPE) => {
1036+
(libc::SOL_TLS, libc::TLS_GET_RECORD_TYPE) => {
10441037
let content_type = ptr::read_unaligned(p as *const u8);
10451038
ControlMessageOwned::TlsGetRecordType(content_type)
10461039
},

0 commit comments

Comments
 (0)