Review Request 118389: Fix Compile for kio/src/core/udsentry.cpp on Mac

Mark Gaiser markg85 at gmail.com
Thu May 29 13:38:33 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118389/#review58716
-----------------------------------------------------------



src/core/udsentry.cpp
<https://git.reviewboard.kde.org/r/118389/#comment40852>

    Replace those 7 lines with:
        insert(UDS_MODIFICATION_TIME,   buff.st_mtime);
        insert(UDS_ACCESS_TIME,         buff.st_atime);


When making this i looked at the stat struct: http://man7.org/linux/man-pages/man2/stat.2.html and used the values as described there. Inspired by the file.cpp implementation (kio fileslave). However, the file slave also uses the lines as a just suggested and "somehow" i didn't copy that over in the constructor.

I think you can replace the said lines and undo the other changes. My guess is that it will compile just fine under mac/linux. And if that's the case then i'm very sorry that i didn't spot this when making the constructor.

- Mark Gaiser


On May 29, 2014, 12:52 p.m., Allen Winter wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118389/
> -----------------------------------------------------------
> 
> (Updated May 29, 2014, 12:52 p.m.)
> 
> 
> Review request for KDE Frameworks, David Faure and Mark Gaiser.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> This patch fixes the compile for kio/src/core/udsentry.cpp on Mac, where the stat structure has the st_mtimespec member instead of st_mtim (and st_atimespec instead of st_atim).
> We use CMake to set the HAVE_STAT_ST_MTIMESPEC macro, which gets defined (or not) in config-kiocore.h
> 
> it also uses st_atimespec (or st_atim) values for setting the USD_ACCESS_TIME. Mark verified this already.
> 
> 
> Diffs
> -----
> 
>   src/core/ConfigureChecks.cmake 472f65f 
>   src/core/config-kiocore.h.cmake 6041c9d 
>   src/core/udsentry.cpp 6ec8e11 
> 
> Diff: https://git.reviewboard.kde.org/r/118389/diff/
> 
> 
> Testing
> -------
> 
> Still compiles on Linux.  Compiles ok on Mac.
> 
> 
> Thanks,
> 
> Allen Winter
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140529/fbcf4713/attachment.html>


More information about the Kde-frameworks-devel mailing list