kio-extras doesn't build after 18.12 release STEPS TO REPRODUCE 1. Try to build kio-extras under macOS OBSERVED RESULT build fails with error https://gist.github.com/d9176b08b5d59f328f194f90041def88 EXPECTED RESULT kio-extras builds fine SOFTWARE/OS VERSIONS MacOS: 10.14.2 KDE Frameworks Version: 5.53 Qt Version: 5.12
I have more details on the problem: On Ubuntu 'st_mtim' is a timespec struct, but on Darwin the same timespec struct (defined in stat.h) is called 'st_mtimespec'. There is a macro for 'st_mtim.tv_sec' on Ubuntu called 'st_mtime'. The same macro is available in Darwin (defined as 'st_mtimespec.tv_sec') so I think all that is necessary is to change line 548 of mtpstorage.cpp to 'srcBuf.st_mtime'. Here is where the macro is defined on Darwin in stat.h: #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) #define st_atime st_atimespec.tv_sec #define st_mtime st_mtimespec.tv_sec #define st_ctime st_ctimespec.tv_sec #define st_birthtime st_birthtimespec.tv_sec #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
Created attachment 117165 [details] Patch I've attached a patch to mtpstorage.cpp. With this patch kio-extras builds on macOS (via Homebrew KDE repo), but I don't know how to verify the functionality is correct.