diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-05 12:50:52 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-05 12:50:52 +0000 |
commit | e78c9199f3e64722b422088627cfd89d0a1dd5cf (patch) | |
tree | ff1e1e1117021c43b8b2d196c6794527e6b64d36 /config.h.post | |
parent | d2b3f0c9cdd5730d0a2af274b777dd8d1ad53d57 (diff) | |
download | mandoc-e78c9199f3e64722b422088627cfd89d0a1dd5cf.tar.gz |
Since old SQLite versions do not have sqlite3_errstr(),
provide a dummy fallback implementation.
Do not bother to decode the error, SQLite error codes
are not useful enough for that to be worthwhile.
Note that using sqlite3_errmsg(db) would be a bad idea:
On malloc() failure, db is NULL, which would cause a segfault.
Issue noticed by kristaps@.
Diffstat (limited to 'config.h.post')
-rw-r--r-- | config.h.post | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/config.h.post b/config.h.post index 07b53415..e95f5f53 100644 --- a/config.h.post +++ b/config.h.post @@ -23,6 +23,9 @@ extern char *suboptarg; #ifndef HAVE_REALLOCARRAY extern void *reallocarray(void *, size_t, size_t); #endif +#ifndef HAVE_SQLITE3_ERRSTR +extern const char *sqlite3_errstr(int); +#endif #ifndef HAVE_STRCASESTR extern char *strcasestr(const char *, const char *); #endif |