1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

[filebrowser] Fix st_atim undefined on macOS (#1662)

When compiling on macOS, an error message will pop up:

```
error: no member named 'st_atim' in 'struct stat'
```

This is because `st_atim`, `st_ctim` and `st_mtim` does not exist on
macOS, instead it uses `st_atimespec`, `st_ctimespec` and
`st_mtimespec`.

In this commit, 3 macros are defined to try to fix this problem.

Reference: https://github.com/hboetes/mg/issues/7
This commit is contained in:
Sainnhe Park 2022-07-29 00:19:39 +08:00 committed by GitHub
parent 485e1ed416
commit 28ad6e34cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,6 +50,12 @@
#define FILEBROWSER_CACHE_FILE "rofi3.filebrowsercache"
#if defined(__APPLE__)
#define st_atim st_atimespec
#define st_ctim st_ctimespec
#define st_mtim st_mtimespec
#endif
/**
* The internal data structure holding the private data of the TEST Mode.
*/