mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-21 13:38:01 +03:00
Extend the strerror_r() result type discrepancy check in os_unix.c to include the Android NDK, as reported in [forum post 3f13857fa4062301|forum:3f13857fa4062301]. The NDK's strerror_r() signature is version-dependent, whereas this change assumes int return (POSIX semantic) across all versions.
FossilOrigin-Name: f18b2524da6bbbcf372b292df52fbe6efa49fd6e1f1f13ef2447279d559f7a08
This commit is contained in:
@@ -1295,8 +1295,12 @@ static int unixLogErrorAtLine(
|
||||
** available, the error message will often be an empty string. Not a
|
||||
** huge problem. Incorrectly concluding that the GNU version is available
|
||||
** could lead to a segfault though.
|
||||
**
|
||||
** Forum post 3f13857fa4062301 reports that the Android SDK may use
|
||||
** int-type return, depending on its version.
|
||||
*/
|
||||
#if defined(STRERROR_R_CHAR_P) || defined(__USE_GNU)
|
||||
#if (defined(STRERROR_R_CHAR_P) || defined(__USE_GNU)) \
|
||||
&& !defined(ANDROID) && !defined(__ANDROID__)
|
||||
zErr =
|
||||
# endif
|
||||
strerror_r(iErrno, aErr, sizeof(aErr)-1);
|
||||
|
||||
Reference in New Issue
Block a user