Skip to content

[filebrowser] Fix st_atim undefined on macOS #1662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2022

Conversation

sainnhe
Copy link
Contributor

@sainnhe sainnhe commented Jul 28, 2022

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: hboetes/mg#7

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: hboetes/mg#7
@DaveDavenport
Copy link
Collaborator

Did not expect Mac users.
Thanks for the patch.

@DaveDavenport DaveDavenport merged commit 28ad6e3 into davatorium:next Jul 28, 2022
@sainnhe sainnhe mentioned this pull request Aug 8, 2022
2 tasks
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants