about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-03 06:24:18 +0100
committerGitHub <noreply@github.com>2021-12-03 06:24:18 +0100
commitaa6f2d9a793ee945a53d89e2db8262829e011958 (patch)
tree80db43f655f19396ff74de474f2c4ae5122ebd4b
parentf056f0d1b4883bffbf4c7256d99b17d86606788a (diff)
parent0fdb109795e4c6f623fdd06b07d5966985b45b1d (diff)
downloadrust-aa6f2d9a793ee945a53d89e2db8262829e011958.tar.gz
rust-aa6f2d9a793ee945a53d89e2db8262829e011958.zip
Rollup merge of #91474 - rtzoeller:dfly_set_errno, r=cuviper
suppress warning about set_errno being unused on DragonFly

Other targets allow this function to be unused, DragonFly just misses out due to providing a specialization.

This fixes a build error for DragonFly.
-rw-r--r--library/std/src/sys/unix/os.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/os.rs b/library/std/src/sys/unix/os.rs
index 7686b61b67a..e48b589f7d8 100644
--- a/library/std/src/sys/unix/os.rs
+++ b/library/std/src/sys/unix/os.rs
@@ -97,6 +97,7 @@ pub fn errno() -> i32 {
 }
 
 #[cfg(target_os = "dragonfly")]
+#[allow(dead_code)]
 pub fn set_errno(e: i32) {
     extern "C" {
         #[thread_local]