| Summary: | mtp/kiod_module/mtpstorage.cpp:548:81: error: no member named 'st_mtim' in 'stat' | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] kio-extras | Reporter: | Yurii Kolesnykov <yurii.kolesnykov> |
| Component: | default | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | ramos.kieran, yurii.kolesnykov |
| Priority: | NOR | ||
| Version First Reported In: | 18.12.0 | ||
| Target Milestone: | --- | ||
| Platform: | Homebrew (macOS) | ||
| OS: | macOS | ||
| URL: | https://github.com/KDE-mac/homebrew-kde/blob/master/Formula/kio-extras.rb | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Patch | ||
|
Description
Yurii Kolesnykov
2018-12-19 07:43:35 UTC
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.
|