From d1c791afbd58a96adeb711cfea386d4bee9ac3db Mon Sep 17 00:00:00 2001 From: lash Date: Sun, 23 Oct 2022 12:57:57 +0100 Subject: [PATCH] Rehabilitate test and non-standard build location - Correct arguments and headers in test - Use libgnunetext library to correctly resolve configuration path when installing in a non-standard location Signed-off-by: lash --- m4/.gitignore | 6 ++++++ src/ext/Makefile.am | 4 ++-- src/ext/ext.conf.in | 1 - src/ext/gnunet-ext.c | 2 +- src/ext/gnunet-service-ext.c | 2 +- src/ext/test_ext_api.c | 5 +++-- 6 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 m4/.gitignore diff --git a/m4/.gitignore b/m4/.gitignore new file mode 100644 index 0000000..c4c8d29 --- /dev/null +++ b/m4/.gitignore @@ -0,0 +1,6 @@ +libtool.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +lt~obsolete.m4 +wchar_t.m4 diff --git a/src/ext/Makefile.am b/src/ext/Makefile.am index 1f3fa1e..0180c1d 100644 --- a/src/ext/Makefile.am +++ b/src/ext/Makefile.am @@ -40,7 +40,7 @@ TESTS = $(check_PROGRAMS) gnunet_service_ext_SOURCES = \ gnunet-service-ext.c gnunet_service_ext_LDADD = \ - -lgnunetutil -lgnunetcore -lgnunetdht\ + -lgnunetutil -lgnunetcore -lgnunetdht -lgnunetext \ $(INTLLIBS) gnunet_service_ext_LDFLAGS = \ $(GNUNET_LDFLAGS) $(WINFLAGS) -export-dynamic @@ -48,7 +48,7 @@ gnunet_service_ext_LDFLAGS = \ gnunet_ext_SOURCES = \ gnunet-ext.c gnunet_ext_LDADD = \ - -lgnunetutil \ + -lgnunetutil -lgnunetext \ $(INTLLIBS) gnunet_ext_LDFLAGS = \ $(GNUNET_LDFLAGS) $(WINFLAGS) -export-dynamic diff --git a/src/ext/ext.conf.in b/src/ext/ext.conf.in index 01a6f54..fb0138c 100644 --- a/src/ext/ext.conf.in +++ b/src/ext/ext.conf.in @@ -3,4 +3,3 @@ BINARY = gnunet-service-ext UNIXPATH = /tmp/gnunet-service-ext.sock HOME = $SERVICEHOME # PORT = 2500 -@UNIXONLY@ PORT = 2500 diff --git a/src/ext/gnunet-ext.c b/src/ext/gnunet-ext.c index 2b91276..b4d19f3 100644 --- a/src/ext/gnunet-ext.c +++ b/src/ext/gnunet-ext.c @@ -42,7 +42,7 @@ static int ret; static const struct GNUNET_OS_ProjectData gnunetext_pd = { .libname = "libgnunetext", - .project_dirname = "gnunet-ext", + .project_dirname = "gnunet", .binary_name = "gnunet-ext", .env_varname = "GNUNET_EXT_PREFIX", .base_config_varname = "GNUNET_EXT_BASE_CONFIG", diff --git a/src/ext/gnunet-service-ext.c b/src/ext/gnunet-service-ext.c index 6399389..f366d4c 100644 --- a/src/ext/gnunet-service-ext.c +++ b/src/ext/gnunet-service-ext.c @@ -65,7 +65,7 @@ static const struct GNUNET_CONFIGURATION_Handle *cfg; */ static const struct GNUNET_OS_ProjectData gnunetext_pd = { .libname = "libgnunetext", - .project_dirname = "gnunet-ext", + .project_dirname = "gnunet", .binary_name = "gnunet-service-ext", .env_varname = "GNUNET_EXT_PREFIX", .base_config_varname = "GNUNET_EXT_BASE_CONFIG", diff --git a/src/ext/test_ext_api.c b/src/ext/test_ext_api.c index ab6a8d3..7306dcd 100644 --- a/src/ext/test_ext_api.c +++ b/src/ext/test_ext_api.c @@ -23,6 +23,8 @@ */ #include "gnunet_ext_config.h" #include +#include +#include #if HAVE_NETINET_IN_H #include @@ -89,8 +91,7 @@ main (int argc, "gnunet-service-ext"); return 77; } - proc = GNUNET_OS_start_process (GNUNET_NO, - GNUNET_OS_INHERIT_STD_ALL, + proc = GNUNET_OS_start_process (GNUNET_NO | GNUNET_OS_INHERIT_STD_ALL, NULL, NULL, NULL, -- 2.38.0