~mort/coffeepaste

656c06710cdc48bad6a8bfc40393b2cb44332d8f — Martin Dørum 2 months ago 2c157f2
cast timeval components to whatever type is appropriate for the host's libc
1 files changed, 3 insertions(+), 3 deletions(-)

M src/purge.rs
M src/purge.rs => src/purge.rs +3 -3
@@ 19,12 19,12 @@ pub fn update_access(fd: unix::io::RawFd, mtime: time::SystemTime)

    let times: [libc::timeval; 2] = [
        libc::timeval{ // atime
            tv_sec: now,
            tv_sec: now as _,
            tv_usec: 0,
        },
        libc::timeval{ // mtime
            tv_sec: mtime.as_secs() as i64,
            tv_usec: mtime.subsec_micros() as i64,
            tv_sec: mtime.as_secs() as _,
            tv_usec: mtime.subsec_micros() as _,
        },
    ];