Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit902befb

Browse files
committed
Compile-fail early if not building for Linux
This avoids confusing errors about missing symbols etc.fix
1 parentd27f17f commit902befb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fnmain() ->Result<(),Box<dyn std::error::Error>>{
2+
println!("cargo:rerun-if-changed=build.rs");
3+
match std::env::var("CARGO_CFG_TARGET_OS"){
4+
Ok(val)if val =="linux" =>Ok(()),
5+
_ =>Err("Building for anything but Linux is not supported by socketcan".into()),
6+
}
7+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp