Skip to content

Commit 8bfb971

Browse files
Use libc constants
1 parent 964cebf commit 8bfb971

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
@@ -878,13 +878,6 @@ pub struct Timestamps {
878878
pub hw_raw: TimeSpec,
879879
}
880880

881-
// Defined in `linux/tls.h`
882-
#[cfg(all(target_os = "linux"))]
883-
const TLS_GET_RECORD_TYPE: c_int = 2;
884-
885-
#[cfg(all(target_os = "linux"))]
886-
const SOL_TLS: c_int = 282;
887-
888881
impl ControlMessageOwned {
889882
/// Decodes a `ControlMessageOwned` from raw bytes.
890883
///
@@ -1028,7 +1021,7 @@ impl ControlMessageOwned {
10281021
ControlMessageOwned::Ipv6OrigDstAddr(dl)
10291022
},
10301023
#[cfg(all(target_os = "linux"))]
1031-
(SOL_TLS, TLS_GET_RECORD_TYPE) => {
1024+
(libc::SOL_TLS, libc::TLS_GET_RECORD_TYPE) => {
10321025
let content_type = ptr::read_unaligned(p as *const u8);
10331026
ControlMessageOwned::TlsGetRecordType(content_type)
10341027
},

0 commit comments

Comments
 (0)