Made dynamic libreadline loading more robust for some systems

This commit is contained in:
Mark Pizzolato 2012-02-28 17:56:41 -08:00
parent 4f6ad32395
commit 9386369bd5

2
scp.c
View file

@ -3965,6 +3965,8 @@ if (!initialized) {
handle = dlopen("libncurses." __STR(HAVE_DLOPEN), RTLD_NOW|RTLD_GLOBAL);
handle = dlopen("libcurses." __STR(HAVE_DLOPEN), RTLD_NOW|RTLD_GLOBAL);
handle = dlopen("libreadline." __STR(HAVE_DLOPEN), RTLD_NOW|RTLD_GLOBAL);
if (!handle)
handle = dlopen("libreadline." __STR(HAVE_DLOPEN) ".6", RTLD_NOW|RTLD_GLOBAL);
if (handle) {
p_readline = dlsym(handle, "readline");
p_add_history = dlsym(handle, "add_history");