projects/aports·blob master · refs

36 lines · 1.3 KiB

1From 36e738e11a9b745a2fb4e8f3cd0ad1d511d9bf5c Mon Sep 17 00:00:00 2001
2From: Lars Ellenberg <[email protected]>
3Date: Mon, 9 Apr 2018 16:56:36 +0200
4Subject: [PATCH] fix name passed to dlopen: libsqlite3.so.0
5
6the libsqlite3.so symlink is only present with the -dev package installed :-(
7---
8 db_sqlite.c | 8 ++++----
9 1 file changed, 4 insertions(+), 4 deletions(-)
10
11diff --git a/db_sqlite.c b/db_sqlite.c
12index 45d6725..0f673bf 100644
13--- a/db_sqlite.c
14+++ b/db_sqlite.c
15@@ -56,16 +56,16 @@ static void *dl_handle;
16
17 static void db_sqlite3_dlopen(void)
18 {
19- csync_debug(2, "Opening shared library libsqlite3.so\n");
20+ csync_debug(2, "Opening shared library libsqlite3.so.0\n");
21
22- dl_handle = dlopen("libsqlite3.so", RTLD_LAZY);
23+ dl_handle = dlopen("libsqlite3.so.0", RTLD_LAZY);
24 if (dl_handle == NULL) {
25 csync_fatal
26- ("Could not open libsqlite3.so: %s\n"
27+ ("Could not open libsqlite3.so.0: %s\n"
28 "Please install sqlite3 client library (libsqlite3) or use other database (postgres, mysql)\n",
29 dlerror());
30 }
31- csync_debug(2, "Reading symbols from shared library libsqlite3.so\n");
32+ csync_debug(2, "Reading symbols from shared library libsqlite3.so.0\n");
33
34 LOOKUP_SYMBOL(dl_handle, sqlite3_open);
35 LOOKUP_SYMBOL(dl_handle, sqlite3_close);
36