Skip to content

Commit 8792010

Browse files
committed
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").
1 parent 2e2642e commit 8792010

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

library/std/src/sys/fs/unix.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,7 @@ impl File {
12631263
target_os = "fuchsia",
12641264
target_os = "linux",
12651265
target_os = "netbsd",
1266+
target_os = "openbsd",
12661267
target_vendor = "apple",
12671268
))]
12681269
pub fn lock(&self) -> io::Result<()> {
@@ -1275,6 +1276,7 @@ impl File {
12751276
target_os = "fuchsia",
12761277
target_os = "linux",
12771278
target_os = "netbsd",
1279+
target_os = "openbsd",
12781280
target_vendor = "apple",
12791281
)))]
12801282
pub fn lock(&self) -> io::Result<()> {
@@ -1286,6 +1288,7 @@ impl File {
12861288
target_os = "fuchsia",
12871289
target_os = "linux",
12881290
target_os = "netbsd",
1291+
target_os = "openbsd",
12891292
target_vendor = "apple",
12901293
))]
12911294
pub fn lock_shared(&self) -> io::Result<()> {
@@ -1298,6 +1301,7 @@ impl File {
12981301
target_os = "fuchsia",
12991302
target_os = "linux",
13001303
target_os = "netbsd",
1304+
target_os = "openbsd",
13011305
target_vendor = "apple",
13021306
)))]
13031307
pub fn lock_shared(&self) -> io::Result<()> {
@@ -1309,6 +1313,7 @@ impl File {
13091313
target_os = "fuchsia",
13101314
target_os = "linux",
13111315
target_os = "netbsd",
1316+
target_os = "openbsd",
13121317
target_vendor = "apple",
13131318
))]
13141319
pub fn try_lock(&self) -> Result<(), TryLockError> {
@@ -1329,6 +1334,7 @@ impl File {
13291334
target_os = "fuchsia",
13301335
target_os = "linux",
13311336
target_os = "netbsd",
1337+
target_os = "openbsd",
13321338
target_vendor = "apple",
13331339
)))]
13341340
pub fn try_lock(&self) -> Result<(), TryLockError> {
@@ -1343,6 +1349,7 @@ impl File {
13431349
target_os = "fuchsia",
13441350
target_os = "linux",
13451351
target_os = "netbsd",
1352+
target_os = "openbsd",
13461353
target_vendor = "apple",
13471354
))]
13481355
pub fn try_lock_shared(&self) -> Result<(), TryLockError> {
@@ -1363,6 +1370,7 @@ impl File {
13631370
target_os = "fuchsia",
13641371
target_os = "linux",
13651372
target_os = "netbsd",
1373+
target_os = "openbsd",
13661374
target_vendor = "apple",
13671375
)))]
13681376
pub fn try_lock_shared(&self) -> Result<(), TryLockError> {
@@ -1377,6 +1385,7 @@ impl File {
13771385
target_os = "fuchsia",
13781386
target_os = "linux",
13791387
target_os = "netbsd",
1388+
target_os = "openbsd",
13801389
target_vendor = "apple",
13811390
))]
13821391
pub fn unlock(&self) -> io::Result<()> {
@@ -1389,6 +1398,7 @@ impl File {
13891398
target_os = "fuchsia",
13901399
target_os = "linux",
13911400
target_os = "netbsd",
1401+
target_os = "openbsd",
13921402
target_vendor = "apple",
13931403
)))]
13941404
pub fn unlock(&self) -> io::Result<()> {

0 commit comments

Comments
 (0)