Skip to content

Commit 3a696d6

Browse files
committed
re-enable flock for illumos
1 parent 23c7bad commit 3a696d6

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

library/std/src/fs/tests.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use rand::RngCore;
55
target_os = "freebsd",
66
target_os = "linux",
77
target_os = "netbsd",
8+
target_os = "illumos",
89
target_vendor = "apple",
910
))]
1011
use crate::assert_matches::assert_matches;
@@ -14,6 +15,7 @@ use crate::char::MAX_LEN_UTF8;
1415
target_os = "freebsd",
1516
target_os = "linux",
1617
target_os = "netbsd",
18+
target_os = "illumos",
1719
target_vendor = "apple",
1820
))]
1921
use crate::fs::TryLockError;
@@ -227,6 +229,7 @@ fn file_test_io_seek_and_write() {
227229
target_os = "linux",
228230
target_os = "netbsd",
229231
target_os = "solaris",
232+
target_os = "illumos",
230233
target_vendor = "apple",
231234
))]
232235
fn file_lock_multiple_shared() {
@@ -251,6 +254,7 @@ fn file_lock_multiple_shared() {
251254
target_os = "linux",
252255
target_os = "netbsd",
253256
target_os = "solaris",
257+
target_os = "illumos",
254258
target_vendor = "apple",
255259
))]
256260
fn file_lock_blocking() {
@@ -276,6 +280,7 @@ fn file_lock_blocking() {
276280
target_os = "linux",
277281
target_os = "netbsd",
278282
target_os = "solaris",
283+
target_os = "illumos",
279284
target_vendor = "apple",
280285
))]
281286
fn file_lock_drop() {
@@ -298,6 +303,7 @@ fn file_lock_drop() {
298303
target_os = "linux",
299304
target_os = "netbsd",
300305
target_os = "solaris",
306+
target_os = "illumos",
301307
target_vendor = "apple",
302308
))]
303309
fn file_lock_dup() {

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,7 @@ impl File {
12921292
target_os = "netbsd",
12931293
target_os = "openbsd",
12941294
target_os = "cygwin",
1295+
target_os = "illumos",
12951296
target_vendor = "apple",
12961297
))]
12971298
pub fn lock(&self) -> io::Result<()> {
@@ -1316,6 +1317,7 @@ impl File {
13161317
target_os = "openbsd",
13171318
target_os = "cygwin",
13181319
target_os = "solaris",
1320+
target_os = "illumos",
13191321
target_vendor = "apple",
13201322
)))]
13211323
pub fn lock(&self) -> io::Result<()> {
@@ -1329,6 +1331,7 @@ impl File {
13291331
target_os = "netbsd",
13301332
target_os = "openbsd",
13311333
target_os = "cygwin",
1334+
target_os = "illumos",
13321335
target_vendor = "apple",
13331336
))]
13341337
pub fn lock_shared(&self) -> io::Result<()> {
@@ -1353,6 +1356,7 @@ impl File {
13531356
target_os = "openbsd",
13541357
target_os = "cygwin",
13551358
target_os = "solaris",
1359+
target_os = "illumos",
13561360
target_vendor = "apple",
13571361
)))]
13581362
pub fn lock_shared(&self) -> io::Result<()> {
@@ -1366,6 +1370,7 @@ impl File {
13661370
target_os = "netbsd",
13671371
target_os = "openbsd",
13681372
target_os = "cygwin",
1373+
target_os = "illumos",
13691374
target_vendor = "apple",
13701375
))]
13711376
pub fn try_lock(&self) -> Result<(), TryLockError> {
@@ -1406,6 +1411,7 @@ impl File {
14061411
target_os = "openbsd",
14071412
target_os = "cygwin",
14081413
target_os = "solaris",
1414+
target_os = "illumos",
14091415
target_vendor = "apple",
14101416
)))]
14111417
pub fn try_lock(&self) -> Result<(), TryLockError> {
@@ -1422,6 +1428,7 @@ impl File {
14221428
target_os = "netbsd",
14231429
target_os = "openbsd",
14241430
target_os = "cygwin",
1431+
target_os = "illumos",
14251432
target_vendor = "apple",
14261433
))]
14271434
pub fn try_lock_shared(&self) -> Result<(), TryLockError> {
@@ -1462,6 +1469,7 @@ impl File {
14621469
target_os = "openbsd",
14631470
target_os = "cygwin",
14641471
target_os = "solaris",
1472+
target_os = "illumos",
14651473
target_vendor = "apple",
14661474
)))]
14671475
pub fn try_lock_shared(&self) -> Result<(), TryLockError> {
@@ -1478,6 +1486,7 @@ impl File {
14781486
target_os = "netbsd",
14791487
target_os = "openbsd",
14801488
target_os = "cygwin",
1489+
target_os = "illumos",
14811490
target_vendor = "apple",
14821491
))]
14831492
pub fn unlock(&self) -> io::Result<()> {
@@ -1502,6 +1511,7 @@ impl File {
15021511
target_os = "openbsd",
15031512
target_os = "cygwin",
15041513
target_os = "solaris",
1514+
target_os = "illumos",
15051515
target_vendor = "apple",
15061516
)))]
15071517
pub fn unlock(&self) -> io::Result<()> {

0 commit comments

Comments
 (0)