File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ impl UnixFileDescription for FileHandle {
178
178
op : FlockOp ,
179
179
) -> InterpResult < ' tcx , io:: Result < ( ) > > {
180
180
assert ! ( communicate_allowed, "isolation should have prevented even opening a file" ) ;
181
- #[ cfg( target_family = "unix" ) ]
181
+ #[ cfg( all ( target_family = "unix" , not ( target_os = "solaris" ) ) ) ]
182
182
{
183
183
use std:: os:: fd:: AsRawFd ;
184
184
@@ -260,10 +260,15 @@ impl UnixFileDescription for FileHandle {
260
260
interp_ok ( res)
261
261
}
262
262
263
- #[ cfg( not( any( target_family = "unix" , target_family = "windows" ) ) ) ]
263
+ #[ cfg( not( any(
264
+ all( target_family = "unix" , not( target_os = "solaris" ) ) ,
265
+ target_family = "windows"
266
+ ) ) ) ]
264
267
{
265
268
let _ = op;
266
- compile_error ! ( "flock is supported only on UNIX and Windows hosts" ) ;
269
+ throw_unsup_format ! (
270
+ "flock is supported only on UNIX (except Solaris) and Windows hosts"
271
+ ) ;
267
272
}
268
273
}
269
274
}
You can’t perform that action at this time.
0 commit comments