Skip to content

Commit 8e95afa

Browse files
committed
re-enable flock for illumos
1 parent 23c7bad commit 8e95afa

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

library/std/src/fs/tests.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ fn file_test_io_seek_and_write() {
227227
target_os = "linux",
228228
target_os = "netbsd",
229229
target_os = "solaris",
230+
target_os = "illumos",
230231
target_vendor = "apple",
231232
))]
232233
fn file_lock_multiple_shared() {
@@ -251,6 +252,7 @@ fn file_lock_multiple_shared() {
251252
target_os = "linux",
252253
target_os = "netbsd",
253254
target_os = "solaris",
255+
target_os = "illumos",
254256
target_vendor = "apple",
255257
))]
256258
fn file_lock_blocking() {
@@ -276,6 +278,7 @@ fn file_lock_blocking() {
276278
target_os = "linux",
277279
target_os = "netbsd",
278280
target_os = "solaris",
281+
target_os = "illumos",
279282
target_vendor = "apple",
280283
))]
281284
fn file_lock_drop() {
@@ -298,6 +301,7 @@ fn file_lock_drop() {
298301
target_os = "linux",
299302
target_os = "netbsd",
300303
target_os = "solaris",
304+
target_os = "illumos",
301305
target_vendor = "apple",
302306
))]
303307
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)