diff --git a/src/sys/socket/sockopt.rs b/src/sys/socket/sockopt.rs index 079258b889..810340041d 100644 --- a/src/sys/socket/sockopt.rs +++ b/src/sys/socket/sockopt.rs @@ -1446,11 +1446,13 @@ impl<'a> Set<'a, bool> for SetBool { } /// Getter for an `u8` value. +#[cfg(feature = "net")] struct GetU8 { len: socklen_t, val: MaybeUninit, } +#[cfg(feature = "net")] impl Get for GetU8 { fn uninit() -> Self { GetU8 { @@ -1478,10 +1480,12 @@ impl Get for GetU8 { } /// Setter for an `u8` value. +#[cfg(feature = "net")] struct SetU8 { val: u8, } +#[cfg(feature = "net")] impl<'a> Set<'a, u8> for SetU8 { fn new(val: &'a u8) -> SetU8 { SetU8 { val: *val }