Skip to content

Commit b3b871e

Browse files
committed
Fix build when with no socket features
1 parent 80ba25d commit b3b871e

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
# Test default features.
2323
- default
2424

25+
# Test minimal featureset
26+
- std proto-ipv4
27+
2528
# Test features chosen to be as orthogonal as possible.
2629
- std ethernet phy-raw_socket proto-ipv6 socket-udp
2730
- std ethernet phy-tap_interface proto-ipv6 socket-udp

Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ ethernet = []
3939
"proto-igmp" = ["proto-ipv4"]
4040
"proto-dhcpv4" = ["proto-ipv4", "socket-raw"]
4141
"proto-ipv6" = []
42-
"socket-raw" = []
43-
"socket-udp" = []
44-
"socket-tcp" = []
45-
"socket-icmp" = []
42+
"socket" = []
43+
"socket-raw" = ["socket"]
44+
"socket-udp" = ["socket"]
45+
"socket-tcp" = ["socket"]
46+
"socket-icmp" = ["socket"]
4647
"async" = []
4748
default = [
4849
"std", "log", # needed for `cargo test --no-default-features --features default` :/

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ pub mod storage;
106106
pub mod phy;
107107
pub mod wire;
108108
pub mod iface;
109+
#[cfg(feature = "socket")]
109110
pub mod socket;
110111
pub mod time;
111112
#[cfg(feature = "proto-dhcpv4")]

0 commit comments

Comments
 (0)