-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Android NDK build fail #93
Comments
Thanks for reporting, I'll look into it. |
I've updated it with -#ifdef _GNU_SOURCE
+#if defined(GNU_SOURCE) && (_POSIX_C_SOURCE < 200112L) && (_XOPEN_SOURCE < 600) but I'm not totally sure that it's really valid for all kind of platforms. |
Should be fixed in bdeffc3. Unfortunately Android doesn't seem to follow the docs in http://linux.die.net/man/3/strerror_r so I had to check for |
shdown
added a commit
to shdown/luastatus
that referenced
this issue
Jun 27, 2019
See: http://man7.org/linux/man-pages/man3/strerror_r.3.html 1. That "(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE" check is glibc-specific. 2. It is simply wrong. We used "defined(_GNU_SOURCE)" instead of "_GNU_SOURCE", as the latter resulted in a compilation error in (the most common?) case of "-D_GNU_SOURCE", with all the header files just checking for "defined(_GNU_SOURCE)". Like, really, what the fuck? They have a totally broken check in the man page. Turns out, even that way it was slightly wrong: see, for example, fmtlib/fmt#93. 3. We *can* ensure that `libls/cstring_utils.c` file is compiled with the feature test macros that result in the XSI-compliant version of strerror_r().
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it uses android-ndk-r10d/platforms/android-15/arch-arm/usr/include/string.h where
The text was updated successfully, but these errors were encountered: