Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error building v0.24.4-rc1on Android #3635

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

Closed
swansontec opened this issue Feb 24, 2016 · 5 comments
Closed

Error building v0.24.4-rc1on Android #3635

swansontec opened this issue Feb 24, 2016 · 5 comments

Comments

@swansontec
Copy link
Contributor

This build failure occurs under the Android NDK for v0.24.4-rc1. This is a regression since version, 0.23.4 which compiled without errors.

libgit2-0.24.0-rc1/src/fileops.c: In function 'git_futils_filestamp_check':
libgit2-0.24.0-rc1/src/fileops.c:1037:40: error: 'struct stat' has no member named 'st_mtim'
  const struct timespec *statmtime = &st.st_mtim;
                                        ^
libgit2-0.24.0-rc1/src/fileops.c: In function 'git_futils_filestamp_set_from_stat':
libgit2-0.24.0-rc1/src/fileops.c:1079:40: error: 'struct stat' has no member named 'st_mtim'
  const struct timespec *statmtime = &st->st_mtim;
@carlosmn
Copy link
Member

We switched over to do auto-detection, so we shouldn't need to care about the particular OS. This is presumably a cross-compilation, right? Are we not doing the right thing there?

@ethomson
Copy link
Member

We're not - in this case we're assuming that a struct stat has a struct timespec. Android's does not:

    unsigned long       st_atime;
    unsigned long       st_atime_nsec;
    unsigned long       st_mtime;
    unsigned long       st_mtime_nsec;

Which is despicable. But whatever. Patch forthcoming.

@swansontec
Copy link
Contributor Author

Thanks.

@ethomson
Copy link
Member

@swansontec No problem, thanks for the helpful report.

@carlosmn
Copy link
Member

Fixed via #3638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants