From 1580aa7a2cbdf5129743c3d5e8ed392266b5ae57 Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Sat, 25 Jan 2025 22:41:18 +0100 Subject: [PATCH] Add -lm for static compile + minor test changes for 7.3 --- apps/backend/Makefile.in | 2 +- apps/cli/Makefile.in | 2 +- apps/netconf/Makefile.in | 2 +- apps/restconf/Makefile.in | 2 +- apps/snmp/Makefile.in | 2 +- lib/src/clixon_hash.c | 2 +- lib/src/clixon_proto.c | 1 - test/lib.sh | 3 +++ test/test_upgrade_module.sh | 2 +- 9 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/backend/Makefile.in b/apps/backend/Makefile.in index 2a412bca5..ce9f22016 100644 --- a/apps/backend/Makefile.in +++ b/apps/backend/Makefile.in @@ -81,7 +81,7 @@ endif # even though it may exist in $(libdir). But the new version may not have been installed yet. LIBDEPS = $(top_srcdir)/lib/src/$(CLIXON_LIB) -LIBS = -L$(top_srcdir)/lib/src $(top_srcdir)/lib/src/$(CLIXON_LIB) @LIBS@ +LIBS = -L$(top_srcdir)/lib/src $(top_srcdir)/lib/src/$(CLIXON_LIB) @LIBS@ -lm INCLUDES = -I. -I$(top_srcdir)/lib/src -I$(top_srcdir)/lib -I$(top_srcdir)/include -I$(top_srcdir) @INCLUDES@ # Name of application diff --git a/apps/cli/Makefile.in b/apps/cli/Makefile.in index 01f9825a5..1ab39dadb 100644 --- a/apps/cli/Makefile.in +++ b/apps/cli/Makefile.in @@ -88,7 +88,7 @@ endif # LINKAGE # even though it may exist in $(libdir). But the new version may not have been installed yet. LIBDEPS = $(top_srcdir)/lib/src/$(CLIXON_LIB) -LIBS = -L$(top_srcdir)/lib/src $(top_srcdir)/lib/src/$(CLIXON_LIB) @LIBS@ +LIBS = -L$(top_srcdir)/lib/src $(top_srcdir)/lib/src/$(CLIXON_LIB) @LIBS@ -lm INCLUDES = -I. -I$(top_srcdir)/lib -I$(top_srcdir)/include -I$(top_srcdir) @INCLUDES@ diff --git a/apps/netconf/Makefile.in b/apps/netconf/Makefile.in index 8289b53eb..0392c8986 100644 --- a/apps/netconf/Makefile.in +++ b/apps/netconf/Makefile.in @@ -75,7 +75,7 @@ endif # For dependency LIBDEPS = $(top_srcdir)/lib/src/$(CLIXON_LIB) -LIBS = -L$(top_srcdir)/lib/src $(top_srcdir)/lib/src/$(CLIXON_LIB) @LIBS@ +LIBS = -L$(top_srcdir)/lib/src $(top_srcdir)/lib/src/$(CLIXON_LIB) @LIBS@ -lm ifeq ($(LINKAGE),dynamic) CPPFLAGS = @CPPFLAGS@ -fPIC diff --git a/apps/restconf/Makefile.in b/apps/restconf/Makefile.in index e62f7ac1a..dd228142a 100644 --- a/apps/restconf/Makefile.in +++ b/apps/restconf/Makefile.in @@ -81,7 +81,7 @@ endif # For dependency LIBDEPS = $(top_srcdir)/lib/src/$(CLIXON_LIB) -LIBS = -L$(top_srcdir)/lib/src $(top_srcdir)/lib/src/$(CLIXON_LIB) @LIBS@ +LIBS = -L$(top_srcdir)/lib/src $(top_srcdir)/lib/src/$(CLIXON_LIB) @LIBS@ -lm YACC = @YACC@ LEX = @LEX@ diff --git a/apps/snmp/Makefile.in b/apps/snmp/Makefile.in index fa2a28663..babec4db4 100644 --- a/apps/snmp/Makefile.in +++ b/apps/snmp/Makefile.in @@ -74,7 +74,7 @@ endif # For dependency LIBDEPS = $(top_srcdir)/lib/src/$(CLIXON_LIB) -LIBS = -L$(top_srcdir)/lib/src $(top_srcdir)/lib/src/$(CLIXON_LIB) @LIBS@ +LIBS = -L$(top_srcdir)/lib/src $(top_srcdir)/lib/src/$(CLIXON_LIB) @LIBS@ -lm CPPFLAGS = @CPPFLAGS@ diff --git a/lib/src/clixon_hash.c b/lib/src/clixon_hash.c index e03e56ffc..91bff43ff 100644 --- a/lib/src/clixon_hash.c +++ b/lib/src/clixon_hash.c @@ -384,7 +384,7 @@ clicon_hash_dump(clicon_hash_t *hash, char **keys = NULL; void *val; size_t klen; - size_t vlen; + size_t vlen = 0; if (hash == NULL) goto ok; diff --git a/lib/src/clixon_proto.c b/lib/src/clixon_proto.c index 96f8a3bad..d3f200745 100644 --- a/lib/src/clixon_proto.c +++ b/lib/src/clixon_proto.c @@ -579,7 +579,6 @@ clixon_msg_rcv11(int s, if (intr){ if (clixon_signal_save(&oldsigset, oldsigaction) < 0) goto done; - set_signal(SIGINT, SIG_IGN, NULL); clicon_signal_unblock(SIGINT); set_signal_flags(SIGINT, 0, atomicio_sig_handler, NULL); diff --git a/test/lib.sh b/test/lib.sh index 1e724631b..0617467dd 100755 --- a/test/lib.sh +++ b/test/lib.sh @@ -553,6 +553,9 @@ function start_backend(){ } function stop_backend(){ + if [ $valgrindtest -eq 2 ]; then + sleep 1 + fi sudo clixon_backend -z $* if [ $? -ne 0 ]; then err "kill backend" diff --git a/test/test_upgrade_module.sh b/test/test_upgrade_module.sh index 5b1eab693..fd0b1c36b 100755 --- a/test/test_upgrade_module.sh +++ b/test/test_upgrade_module.sh @@ -315,7 +315,7 @@ EOF new "b payload only" testall '' '' -new "b payload and interfaces payload---------" +new "b payload and interfaces payload" testall '' '' new "a payload only"