PKGBUILDs/extra/subversion/sqlite-config.patch
2009-09-26 09:35:50 -05:00

18 lines
925 B
Diff

diff -Nur subversion-1.6.1.orig/subversion/libsvn_subr/sqlite.c subversion-1.6.1/subversion/libsvn_subr/sqlite.c
--- subversion-1.6.1.orig/subversion/libsvn_subr/sqlite.c 2009-02-28 03:37:29.000000000 +1100
+++ subversion-1.6.1/subversion/libsvn_subr/sqlite.c 2009-04-30 07:54:58.000000000 +1000
@@ -503,8 +503,12 @@
"thread-safe mode"));
#endif
#if SQLITE_VERSION_AT_LEAST(3,6,0)
- SQLITE_ERR_MSG(sqlite3_config(SQLITE_CONFIG_MULTITHREAD),
- "Could not configure SQLite");
+ /* If SQLite has been already initialized, sqlite3_config() returns
+ SQLITE_MISUSE. */
+ int err = sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
+ if (err != SQLITE_OK && err != SQLITE_MISUSE)
+ return svn_error_create(SQLITE_ERROR_CODE(err), NULL,
+ "Could not configure SQLite");
SQLITE_ERR_MSG(sqlite3_initialize(), "Could not initialize SQLite");
#endif