-
Notifications
You must be signed in to change notification settings - Fork 26
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
error: no member named 'st_atim' in 'struct stat' #7
Comments
First hit on google for: “error: no member named ‘st_atim’ in” :-)
…On Sat, Oct 13, 2018 at 12:52 PM Ryan Schmidt ***@***.***> wrote:
Hello, we have an old version of mg in MacPorts which I'm trying to update
to your latest version 20180927. I'm trying to build it on macOS High
Sierra.
First, it told me to install libbsd. I tried to build libbsd, but it
failed. I reported that to the developers of libbsd. Then, since macOS is
based on BSD, I tried patching your makefile so that it would not require a
separate libbsd.
That got me further, and now it fails to build for me with this error:
fileio.c:282:20: error: no member named 'st_atim' in 'struct stat'
new_times[0] = sb.st_atim;
~~ ^
fileio.c:283:20: error: no member named 'st_mtim' in 'struct stat'
new_times[1] = sb.st_mtim;
~~ ^
2 errors generated.
I've run into this problem with other projects as well. Seems this is just
one of those things that different operating systems do differently: macOS
doesn't use the names st_atim, st_ctim, st_mtim, but instead uses
st_atimespec, st_ctimespec, st_mtimespec.
Since the last release, I see you've added cmake support. Maybe you could
have cmake detect which time fields to use on the current OS.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACLeqWqkO7Hw8nAjgjkjnm5NxNy9N1Seks5ukcXWgaJpZM4Xakpr>
.
|
I built this for iOS, encountered the same thing. |
Hi there @blanxd, Cheers! |
Just a heads up, this applies to NetBSD as well. In my port of mg I use the following in #if defined(__APPLE__) || defined(__NetBSD__)
#define st_atim st_atimespec
#define st_ctim st_ctimespec
#define st_mtim st_mtimespec
#endif |
Hello Joachim,
can you create a pull request?
Thanks!
Joachim Nilsson <notifications@github.com> schrieb am Sa., 23. März 2019,
14:18:
… Just a heads up, this applies to NetBSD as well. In my port of mg
<https://github.com/troglobit/mg/> I use the following in defs.h:
#if defined(__APPLE__) || defined(__NetBSD__)
#define st_atim st_atimespec
#define st_ctim st_ctimespec
#define st_mtim st_mtimespec
#endif
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACLeqSQYelektPgesujjYTMdykIEk7-3ks5vZimcgaJpZM4Xakpr>
.
|
12 tasks
sainnhe
added a commit
to sainnhe/rofi
that referenced
this issue
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
DaveDavenport
pushed a commit
to davatorium/rofi
that referenced
this issue
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
12 tasks
g-branden-robinson
pushed a commit
to g-branden-robinson/mg
that referenced
this issue
Oct 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, we have an old version of mg in MacPorts which I'm trying to update to your latest version 20180927. I'm trying to build it on macOS High Sierra.
First, it told me to install libbsd. I tried to build libbsd, but it failed. I reported that to the developers of libbsd. Then, since macOS is based on BSD, I tried patching your makefile so that it would not require a separate libbsd.
That got me further, and now it fails to build for me with this error:
I've run into this problem with other projects as well. Seems this is just one of those things that different operating systems do differently: macOS doesn't use the names
st_atim
,st_ctim
,st_mtim
, but instead usesst_atimespec
,st_ctimespec
,st_mtimespec
.Since the last release, I see you've added cmake support. Maybe you could have cmake detect which time fields to use on the current OS.
The text was updated successfully, but these errors were encountered: