From f673c51bcc91bcf34bdaf1abc9cfbb0ffca62c99 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Wed, 21 Dec 2016 18:17:03 +0000 Subject: [PATCH] Patches to fix distribution builds. --- Makefile.am | 20 +++++++++++++++++--- common/tests/thread_test.c | 5 +++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 72a9e66..1faaa2d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,6 +36,17 @@ common/tr_mq.c check_PROGRAMS = common/t_constraint TESTS = common/t_constraint +lib_LTLIBRARIES = libtr_tid.la + +libtr_tid_la_SOURCES = $(tid_srcs) \ +$(common_srcs) \ +trp/trp_req.c \ +trp/trp_upd.c + +libtr_tid_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden +libtr_tid_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS) +libtr_tid_la_LDFLAGS = $(AM_LDFLAGS) -version-info 3 -no-undefined + common_t_constraint_SOURCES = common/t_constraint.c \ common/tr_debug.c \ common/tr_name.c \ @@ -134,7 +145,7 @@ common_tests_commtest_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread common_tests_thread_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread pkginclude_HEADERS = include/trust_router/tid.h include/trust_router/tr_name.h \ - include/tr_debug.h \ + include/tr_debug.h include/trust_router/trp.h \ include/trust_router/tr_dh.h \ include/trust_router/tr_constraint.h \ include/trust_router/tr_versioning.h @@ -144,8 +155,11 @@ noinst_HEADERS = include/gsscon.h include/tr_config.h \ include/tr_idp.h include/tr_rp.h \ include/tr_comm.h include/tr_apc.h \ include/tr_tid.h include/tr_trp.h \ - include/tr_filter.h \ - include/tid_internal.h + include/tr_filter.h include/tr_gss.h \ + include/tid_internal.h include/trp_internal.h \ + include/tr_cfgwatch.h include/tr_event.h \ + include/tr_mq.h include/tr_ptable.h \ + include/tr_rtable.h include/tr_util.h pkgdata_DATA=schema.sql nobase_dist_pkgdata_DATA=redhat/init redhat/sysconfig redhat/organizations.cfg redhat/tidc-wrapper redhat/trust_router-wrapper redhat/tr-test-internal.cfg redhat/default-internal.cfg redhat/tids-wrapper redhat/sysconfig.tids diff --git a/common/tests/thread_test.c b/common/tests/thread_test.c index 2cf1438..14aac6f 100644 --- a/common/tests/thread_test.c +++ b/common/tests/thread_test.c @@ -39,6 +39,7 @@ #include #include #include +#include #include @@ -53,7 +54,7 @@ static TR_MQ_MSG *make_msg(char *label, int n) { TR_MQ_MSG *msg=NULL; msg=tr_mq_msg_new(NULL, "Message", TR_MQ_PRIO_NORMAL); - asprintf((char **)&(msg->p), "%s: %d messages to go...", label, n); + assert(-1!=asprintf((char **)&(msg->p), "%s: %d messages to go...", label, n)); msg->p_free=free; return msg; } @@ -128,7 +129,7 @@ int main(void) thread_data[ii].mq=mq; thread_data[ii].msg_dly=dly[ii]; thread_data[ii].n_msgs=10; - asprintf(&(thread_data[ii].label), "thread %d", ii+1); + assert(-1!=asprintf(&(thread_data[ii].label), "thread %d", ii+1)); pthread_create(&(thread[ii]), NULL, thread_start, &thread_data[ii]); printf("%s started.\n", thread_data[ii].label); } -- 2.1.4