johnyburd / net-route

Rust crate providing a cross platform interface for interacting with the routing table
https://docs.rs/net-route/
21 stars 14 forks source link

Fixes cross compiling on macOS #2

Closed Matt3o12 closed 1 year ago

Matt3o12 commented 1 year ago

build.rs now uses env::var("CARGO_CFG_TARGET_OS") to check which os the build is targetting. Unfortunately, in build.rs target_os is always host_os. So we have to check for the enviornment variable.

This is generally the recommened way to check for the target_os inside build.rs:

johnyburd commented 1 year ago

TIL. thanks for the PR and sorry for the slow response.