From b7b4e857be15c2f34ada9d63c988fc3d4debcc6f Mon Sep 17 00:00:00 2001 From: Damien Stuart Date: Sun, 13 Jan 2013 22:16:30 -0500 Subject: [PATCH] Change to how strlcpy and strlcat are handled Put strlcpy and strlcat object files back in the source group in lib. Moved libfko_util.a to the common directory (though sources remain in lib). Client and server code looks to common dir for libfko-util. This fixes issue with strlcpy showing as undefined symbol when perl FKO module is loaded. --- client/Makefile.am | 2 +- common/Makefile.am | 6 ++++++ lib/Makefile.am | 11 +---------- server/Makefile.am | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/client/Makefile.am b/client/Makefile.am index 6c48198a..61525a12 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -6,7 +6,7 @@ fwknop_SOURCES = fwknop.c fwknop.h config_init.c config_init.h \ fwknop_CPPFLAGS = -I $(top_srcdir)/lib -I $(top_srcdir)/common -fwknop_LDADD = $(top_builddir)/lib/libfko.la $(top_builddir)/lib/libfko_util.a +fwknop_LDADD = $(top_builddir)/lib/libfko.la $(top_builddir)/common/libfko_util.a dist_man_MANS = fwknop.8 diff --git a/common/Makefile.am b/common/Makefile.am index 6eb7b45d..be50de28 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -1 +1,7 @@ +libfko_util_source_files = ../lib/strlcpy.c ../lib/strlcat.c ../lib/fko_util.h +libfko_util_a_SOURCES = $(libfko_util_source_files) +libfko_util_a_LIBADD = + +noinst_LIBRARIES = libfko_util.a + EXTRA_DIST = common.h netinet_common.h diff --git a/lib/Makefile.am b/lib/Makefile.am index fd86623c..84916317 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -8,20 +8,11 @@ libfko_source_files = \ fko.h fko_limits.h fko_timestamp.c fko_user.c fko_user.h \ md5.c md5.h rijndael.c rijndael.h sha1.c sha1.h sha2.c sha2.h \ fko_context.h fko_state.h fko_context.h gpgme_funcs.c \ - gpgme_funcs.h + gpgme_funcs.h strlcpy.c strlcat.c fko_util.h libfko_la_SOURCES = $(libfko_source_files) -libfko_la_LIBADD = -libfko_la_DEPENDENCIES = strlcpy.lo strlcat.lo libfko_la_LDFLAGS = -version-info 1:0:0 $(GPGME_LIBS) -export-symbols-regex '^fko_' -libfko_util_source_files = strlcpy.c strlcat.c fko_util.h -libfko_util_a_SOURCES = $(libfko_util_source_files) -libfko_util_a_LIBADD = -libfko_util_a_DEPENDENCIES = strlcpy.lo strlcat.lo - -noinst_LIBRARIES = libfko_util.a - AM_CPPFLAGS = $(GPGME_CFLAGS) -I $(top_srcdir)/common include_HEADERS = fko.h diff --git a/server/Makefile.am b/server/Makefile.am index 5de71553..fc321ba4 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -12,7 +12,7 @@ fwknopd_SOURCES = fwknopd.c fwknopd.h config_init.c config_init.h \ fw_util_ipfw.c fw_util_ipfw.h \ fw_util_pf.c fw_util_pf.h cmd_opts.h -fwknopd_LDADD = $(top_builddir)/lib/libfko.la $(top_builddir)/lib/libfko_util.a -lpcap +fwknopd_LDADD = $(top_builddir)/lib/libfko.la $(top_builddir)/common/libfko_util.a -lpcap if ! CONFIG_FILE_CACHE if USE_NDBM