Rust build fails on OpenBSD after using file_lock feature

PR 130999 added the file_lock feature, but doesn't included OpenBSD in the supported targets (Tier 3 platform), leading to a compilation error ("try_lock() not supported").
This commit is contained in:
Sebastien Marie 2025-08-16 20:11:52 +02:00
parent 2e2642e641
commit 8792010768

View file

@ -1263,6 +1263,7 @@ impl File {
target_os = "fuchsia",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
target_vendor = "apple",
))]
pub fn lock(&self) -> io::Result<()> {
@ -1275,6 +1276,7 @@ impl File {
target_os = "fuchsia",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
target_vendor = "apple",
)))]
pub fn lock(&self) -> io::Result<()> {
@ -1286,6 +1288,7 @@ impl File {
target_os = "fuchsia",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
target_vendor = "apple",
))]
pub fn lock_shared(&self) -> io::Result<()> {
@ -1298,6 +1301,7 @@ impl File {
target_os = "fuchsia",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
target_vendor = "apple",
)))]
pub fn lock_shared(&self) -> io::Result<()> {
@ -1309,6 +1313,7 @@ impl File {
target_os = "fuchsia",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
target_vendor = "apple",
))]
pub fn try_lock(&self) -> Result<(), TryLockError> {
@ -1329,6 +1334,7 @@ impl File {
target_os = "fuchsia",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
target_vendor = "apple",
)))]
pub fn try_lock(&self) -> Result<(), TryLockError> {
@ -1343,6 +1349,7 @@ impl File {
target_os = "fuchsia",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
target_vendor = "apple",
))]
pub fn try_lock_shared(&self) -> Result<(), TryLockError> {
@ -1363,6 +1370,7 @@ impl File {
target_os = "fuchsia",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
target_vendor = "apple",
)))]
pub fn try_lock_shared(&self) -> Result<(), TryLockError> {
@ -1377,6 +1385,7 @@ impl File {
target_os = "fuchsia",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
target_vendor = "apple",
))]
pub fn unlock(&self) -> io::Result<()> {
@ -1389,6 +1398,7 @@ impl File {
target_os = "fuchsia",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
target_vendor = "apple",
)))]
pub fn unlock(&self) -> io::Result<()> {