Skip to content

Fix android build #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/route/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ impl<T> RouteMessageBuilder<T> {
}

/// Sets the output MPLS encapsulation labels.
#[cfg(not(target_os = "android"))]
pub fn output_mpls(mut self, labels: Vec<MplsLabel>) -> Self {
if labels.is_empty() {
return self;
Expand Down Expand Up @@ -442,6 +443,7 @@ impl Default for RouteMessageBuilder<IpAddr> {
}
}

#[cfg(not(target_os = "android"))]
impl RouteMessageBuilder<MplsLabel> {
/// Create default RouteMessage with header set to:
/// * route: [RouteHeader::RT_TABLE_MAIN]
Expand All @@ -458,6 +460,7 @@ impl RouteMessageBuilder<MplsLabel> {
builder
}

#[cfg(not(target_os = "android"))]
/// Sets the destination MPLS label.
pub fn label(mut self, label: MplsLabel) -> Self {
self.message.header.address_family = AddressFamily::Mpls;
Expand All @@ -476,7 +479,7 @@ impl RouteMessageBuilder<MplsLabel> {
self
}
}

#[cfg(not(target_os = "android"))]
impl Default for RouteMessageBuilder<MplsLabel> {
fn default() -> Self {
Self::new()
Expand Down Expand Up @@ -523,6 +526,7 @@ impl RouteNextHopBuilder {
}

/// Sets the nexthop MPLS encapsulation labels.
#[cfg(not(target_os = "android"))]
pub fn mpls(mut self, labels: Vec<MplsLabel>) -> Self {
if labels.is_empty() {
return self;
Expand Down