Skip to content

Fix so-names for additional libraries #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions db_mysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ static void *dl_handle;

static void db_mysql_dlopen(void)
{
csync_debug(2, "Opening shared library libmysqlclient.so\n");
dl_handle = dlopen("libmysqlclient.so", RTLD_LAZY);
csync_debug(2, "Opening shared library libmysqlclient.so.18\n");
dl_handle = dlopen("libmysqlclient.so.18", RTLD_LAZY);
if (dl_handle == NULL) {
csync_fatal
("Could not open libmysqlclient.so: %s\n"
("Could not open libmysqlclient.so.18: %s\n"
"Please install Mysql client library (libmysqlclient) or use other database (sqlite, postgres)\n",
dlerror());
}

csync_debug(2, "Reading symbols from shared library libmysqlclient.so\n");
csync_debug(2, "Reading symbols from shared library libmysqlclient.so.18\n");

LOOKUP_SYMBOL(dl_handle, mysql_init);
LOOKUP_SYMBOL(dl_handle, mysql_real_connect);
Expand Down
8 changes: 4 additions & 4 deletions db_postgres.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ static void *dl_handle;

static void db_postgres_dlopen(void)
{
csync_debug(2, "Opening shared library libpq.so\n");
csync_debug(2, "Opening shared library libpq.so.5\n");

dl_handle = dlopen("libpq.so", RTLD_LAZY);
dl_handle = dlopen("libpq.so.5", RTLD_LAZY);
if (dl_handle == NULL) {
csync_fatal
("Could not open libpq.so: %s\n"
("Could not open libpq.so.5: %s\n"
"Please install postgres client library (libpg) or use other database (sqlite, mysql)\n",
dlerror());
}
csync_debug(2, "Reading symbols from shared library libpq.so\n");
csync_debug(2, "Reading symbols from shared library libpq.so.5\n");

LOOKUP_SYMBOL(dl_handle, PQconnectdb);
LOOKUP_SYMBOL(dl_handle, PQstatus);
Expand Down
11 changes: 4 additions & 7 deletions db_sqlite2.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,17 @@ static void *dl_handle;

static void db_sqlite_dlopen(void)
{
csync_debug(2, "Opening shared library libsqlite.so\n");
csync_debug(2, "Opening shared library libsqlite.so.0\n");

dl_handle = dlopen("libsqlite.so", RTLD_LAZY);
dl_handle = dlopen("libsqlite.so.0", RTLD_LAZY);
if (dl_handle == NULL) {
csync_debug(1, "Libsqlite.so not found, trying libsqlite.so.0\n");
dl_handle = dlopen("libsqlite.so.0", RTLD_LAZY);
if (dl_handle == NULL) {
csync_fatal
("Could not open libsqlite.so: %s\n"
("Could not open libsqlite.so.0: %s\n"
"Please install sqlite client library (libsqlite) or use other database (postgres, mysql)\n",
dlerror());
}
}
csync_debug(2, "Opening shared library libsqlite.so\n");
csync_debug(2, "Opening shared library libsqlite.so.0\n");

LOOKUP_SYMBOL(dl_handle, sqlite_open);
LOOKUP_SYMBOL(dl_handle, sqlite_close);
Expand Down