-
Notifications
You must be signed in to change notification settings - Fork 258
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
libc.so and time.h are inconsistent about when timegm was introduced #130
Comments
This will be fixed by unified headers (#120) |
Is there any possibility it could be fixed sooner, manually, in an r12 update? As I said it's breaking our build. |
until r13 you can manually fix it in your copy of <time.h>, just add extern time_t timelocal(struct tm*); extern time_t timegm(struct tm*); to the appropriate time.h for the API level you're targeting (or to your generated stand-alone toolchain). |
Unified headers have been pushed to r14. Can this be re-opened for r13? |
Unfortunately they are still far from ready :\ |
Yes -- given that, can a specific timegm() fix be made for r13, to the current non-unified headers? It should just be a matter of adding
to /usr/include/time.h for all the relevant platforms. The relevant platforms are:
|
Ah, I misunderstood what you meant (I was thinking "pushed" in the git sense of the word). Yeah, let me see if I can get a patch together. Should be fine pending any surprises. |
Thanks. It looks like this affects timelocal() as well. |
Up for review: https://android-review.googlesource.com/#/c/272893/ |
Submitted to master. Cherry-picks to r13 are waiting for presubmit. |
Changes are in r13. Note that they aren't in the r13-beta2 release that was released earlier today (that build was actually finalized ~3 weeks ago), but they'll be in the stable release. |
Add timegm and timelocal. Test: run_tests.py --filter timegm Bug: android/ndk#130 Change-Id: Icc8fa6ca1616bc0b6dd79519daa2a6a4316fab9c
Add timegm and timelocal. Test: run_tests.py --filter timegm Bug: android/ndk#130 Change-Id: Icc8fa6ca1616bc0b6dd79519daa2a6a4316fab9c
Test: ./checkbuild.py Bug: android/ndk#130 Change-Id: I5be3410e1d1e69dd7192383520de11579f0dcb6a
In NDK r12b, libc.so and time.h are inconsistent about which Android platform versions have the timegm() function. The headers are written such that they were introduced in version 21, but the libraries indicate they were introduced in version 12.
The problem this causes is that when building software that uses GNU autoconf (using a standalone toolchain) and targeting Android versions 12 - 19, autoconf's configure test detects that timegm exists, but the build fails at runtime because the function is undeclared.
checking for timegm... yes
This problem is new in NDK 12; NDK 11c does not have the problem.
The text was updated successfully, but these errors were encountered: