@@ -13,7 +13,6 @@ use std::io::ErrorKind;
1313use std:: num:: NonZeroU32 ;
1414use std:: sync:: Arc ;
1515use std:: sync:: atomic:: Ordering ;
16- use tracing:: error;
1716use tracing:: info;
1817use tracing:: trace;
1918
@@ -937,7 +936,7 @@ impl Filesystem for OverlayFs {
937936 // This enables seekdir/telldir functionality on directories
938937 match whence {
939938 // SEEK_SET: Set the directory position to an absolute value
940- libc:: SEEK_SET => {
939+ x if x == libc:: SEEK_SET as u32 => {
941940 // Validate offset bounds to prevent overflow
942941 // Directory offsets should not exceed i64::MAX
943942 if offset > i64:: MAX as u64 {
@@ -949,11 +948,11 @@ impl Filesystem for OverlayFs {
949948 layer. lseek ( req, real_inode, real_handle, offset, whence) . await
950949 }
951950 // SEEK_CUR: Move relative to the current directory position
952- libc:: SEEK_CUR => {
951+ x if x == libc:: SEEK_CUR as u32 => {
953952 // Get current position from underlying layer
954953 // This is needed to calculate the new position
955954 let current = match layer
956- . lseek ( req, real_inode, real_handle, 0 , libc:: SEEK_CUR )
955+ . lseek ( req, real_inode, real_handle, 0 , libc:: SEEK_CUR as u32 )
957956 . await
958957 {
959958 Ok ( r) => r. offset ,
@@ -971,7 +970,7 @@ impl Filesystem for OverlayFs {
971970 // Actually set the underlying offset to the new value so behavior
972971 // matches passthrough which uses libc::lseek64 to set the fd offset.
973972 match layer
974- . lseek ( req, real_inode, real_handle, new_offset, libc:: SEEK_SET )
973+ . lseek ( req, real_inode, real_handle, new_offset, libc:: SEEK_SET as u32 )
975974 . await
976975 {
977976 Ok ( _) => Ok ( ReplyLSeek { offset : new_offset } ) ,
0 commit comments