mirror of
https://github.com/pi-hole/FTL.git
synced 2025-12-25 05:06:34 +00:00
Reference sqlite3ErrName instead of copying it. This requires SQLite3 patching
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
22
patch/sqlite3/0002-make-sqlite3ErrName-public.patch
Normal file
22
patch/sqlite3/0002-make-sqlite3ErrName-public.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
diff --git a/src/database/sqlite3.c b/src/database/sqlite3.c
|
||||
index 2763b1b4..55f88efb 100644
|
||||
--- a/src/database/sqlite3.c
|
||||
+++ b/src/database/sqlite3.c
|
||||
@@ -173885,8 +173885,7 @@ SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db, int tripCode){
|
||||
** Return a static string containing the name corresponding to the error code
|
||||
** specified in the argument.
|
||||
*/
|
||||
-#if defined(SQLITE_NEED_ERR_NAME)
|
||||
-SQLITE_PRIVATE const char *sqlite3ErrName(int rc){
|
||||
+SQLITE_API const char *sqlite3ErrName(int rc){
|
||||
const char *zName = 0;
|
||||
int i, origRc = rc;
|
||||
for(i=0; i<2 && zName==0; i++, rc &= 0xff){
|
||||
@@ -173991,7 +173990,6 @@ SQLITE_PRIVATE const char *sqlite3ErrName(int rc){
|
||||
}
|
||||
return zName;
|
||||
}
|
||||
-#endif
|
||||
|
||||
/*
|
||||
** Return a static string that describes the kind of error specified in the
|
||||
Reference in New Issue
Block a user