From db7e04e0dfb9cebbf4ea1afa6b5aa93f2d8d0d3b Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 17 Nov 2011 13:06:36 -0800 Subject: [PATCH] Cleanup of readline and static libpcap support after multi-platform testing. --- makefile | 6 ++++-- scp.c | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index cd2d0194..34f0246d 100644 --- a/makefile +++ b/makefile @@ -121,7 +121,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin) endif else NETWORK_CCDEFS = -DUSE_SHARED - $(info using libpcap: $$(call find_include,pcap)) + $(info using libpcap: $(call find_include,pcap)) endif endif ifneq (,$(call find_lib,vdeplug)) @@ -149,14 +149,16 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin) # Look for package built from tcpdump.org sources with default install target LIBPATH += /usr/local/lib INCPATH += /usr/local/include + LIBEXTSAVE = $(LIBEXT) LIBEXT = a ifneq (,$(call find_lib,pcap)) ifneq (,$(call find_include,pcap)) - NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include /usr/local/lib/libpcap.a + NETWORK_OPT := -DUSE_NETWORK -isystem $(dir $(call find_include,pcap)) $(call find_lib,pcap) $(info using libpcap: $(call find_lib,pcap) $(call find_include,pcap)) else $(error using libpcap: $(call find_lib,pcap) missing pcap.h) endif + LIBEXT = $(LIBEXTSAVE) else $(error missing libpcap) endif diff --git a/scp.c b/scp.c index 3920db7d..b70905be 100644 --- a/scp.c +++ b/scp.c @@ -3852,6 +3852,7 @@ if (!initialized) { #define __STR_QUOTE(tok) #tok #define __STR(tok) __STR_QUOTE(tok) 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) { p_readline = dlsym(handle, "readline");