File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed
src/devices/src/virtio/fs/linux Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -1996,24 +1996,15 @@ impl OverlayFs {
19961996
19971997 // Perform the rename
19981998 let res = unsafe {
1999- #[ cfg( target_env = "gnu" ) ]
1999+ #[ cfg( any ( target_env = "gnu" , target_env = "musl" ) ) ]
20002000 {
2001- libc:: renameat2 (
2002- old_parent_data. file . as_raw_fd ( ) ,
2003- old_name. as_ptr ( ) ,
2004- new_parent_data. file . as_raw_fd ( ) ,
2005- new_name. as_ptr ( ) ,
2006- flags,
2007- )
2008- }
2009- #[ cfg( target_env = "musl" ) ]
2010- {
2011- libc:: renameat (
2012- old_parent_data. file . as_raw_fd ( ) ,
2013- old_name. as_ptr ( ) ,
2014- new_parent_data. file . as_raw_fd ( ) ,
2015- new_name. as_ptr ( ) ,
2016- )
2001+ libc:: renameat2 (
2002+ old_parent_data. file . as_raw_fd ( ) ,
2003+ old_name. as_ptr ( ) ,
2004+ new_parent_data. file . as_raw_fd ( ) ,
2005+ new_name. as_ptr ( ) ,
2006+ flags,
2007+ )
20172008 }
20182009 } ;
20192010
You can’t perform that action at this time.
0 commit comments