From f2629342b22003994f62760c7a19ebf13b61e976 Mon Sep 17 00:00:00 2001 From: Miroslav Zagorac Date: Thu, 19 Jan 2023 09:50:56 +0100 Subject: [PATCH] BUILD: ot: removed explicit include path when building opentracing filter The -Iaddons/ot/include flag in OT_CFLAGS allowed source files to use a bare #include "include.h", which was fragile because it depended on the compiler search path. Removed that flag from the Makefile and changed every source file under addons/ot/src/ to use the relative include path ../include/include.h instead. This made header resolution explicit and consistent with standard addon conventions. --- addons/ot/Makefile | 2 +- addons/ot/src/cli.c | 2 +- addons/ot/src/conf.c | 2 +- addons/ot/src/event.c | 2 +- addons/ot/src/filter.c | 2 +- addons/ot/src/group.c | 2 +- addons/ot/src/http.c | 2 +- addons/ot/src/opentracing.c | 2 +- addons/ot/src/parser.c | 2 +- addons/ot/src/pool.c | 2 +- addons/ot/src/scope.c | 2 +- addons/ot/src/util.c | 2 +- addons/ot/src/vars.c | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/ot/Makefile b/addons/ot/Makefile index 5bf8d9e8e..416329199 100644 --- a/addons/ot/Makefile +++ b/addons/ot/Makefile @@ -70,4 +70,4 @@ OPTIONS_OBJS += \ addons/ot/src/vars.o endif -OT_CFLAGS := $(OT_CFLAGS) -Iaddons/ot/include $(OT_DEFINE) +OT_CFLAGS := $(OT_CFLAGS) $(OT_DEFINE) diff --git a/addons/ot/src/cli.c b/addons/ot/src/cli.c index 0080dbd43..7bf588f0a 100644 --- a/addons/ot/src/cli.c +++ b/addons/ot/src/cli.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "include.h" +#include "../include/include.h" /*** diff --git a/addons/ot/src/conf.c b/addons/ot/src/conf.c index c6375a6b3..789c86a35 100644 --- a/addons/ot/src/conf.c +++ b/addons/ot/src/conf.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "include.h" +#include "../include/include.h" /*** diff --git a/addons/ot/src/event.c b/addons/ot/src/event.c index dc29d52a2..827b70929 100644 --- a/addons/ot/src/event.c +++ b/addons/ot/src/event.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "include.h" +#include "../include/include.h" #define FLT_OT_EVENT_DEF(a,b,c,d,e,f) { AN_##b##_##a, SMP_OPT_DIR_##b, SMP_VAL_FE_##c, SMP_VAL_BE_##d, e, f }, diff --git a/addons/ot/src/filter.c b/addons/ot/src/filter.c index 20d61d981..0ae542eb4 100644 --- a/addons/ot/src/filter.c +++ b/addons/ot/src/filter.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "include.h" +#include "../include/include.h" /* diff --git a/addons/ot/src/group.c b/addons/ot/src/group.c index 52b872dcc..6798e8a53 100644 --- a/addons/ot/src/group.c +++ b/addons/ot/src/group.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "include.h" +#include "../include/include.h" #define FLT_OT_GROUP_DEF(a,b,c) { a, b, c }, diff --git a/addons/ot/src/http.c b/addons/ot/src/http.c index 517bd0de3..0a3572af4 100644 --- a/addons/ot/src/http.c +++ b/addons/ot/src/http.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "include.h" +#include "../include/include.h" #ifdef DEBUG_OT diff --git a/addons/ot/src/opentracing.c b/addons/ot/src/opentracing.c index 8ae5f021c..60b71d9b2 100644 --- a/addons/ot/src/opentracing.c +++ b/addons/ot/src/opentracing.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "include.h" +#include "../include/include.h" static struct pool_head *pool_head_ot_span_context __read_mostly = NULL; diff --git a/addons/ot/src/parser.c b/addons/ot/src/parser.c index c59a18418..f3b4df3f1 100644 --- a/addons/ot/src/parser.c +++ b/addons/ot/src/parser.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "include.h" +#include "../include/include.h" #ifdef DEBUG_OT diff --git a/addons/ot/src/pool.c b/addons/ot/src/pool.c index fbcdbfc21..fdf7235dd 100644 --- a/addons/ot/src/pool.c +++ b/addons/ot/src/pool.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "include.h" +#include "../include/include.h" /*** diff --git a/addons/ot/src/scope.c b/addons/ot/src/scope.c index 8a4c02f3c..d787caabf 100644 --- a/addons/ot/src/scope.c +++ b/addons/ot/src/scope.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "include.h" +#include "../include/include.h" static struct pool_head *pool_head_ot_scope_span __read_mostly = NULL; diff --git a/addons/ot/src/util.c b/addons/ot/src/util.c index fd040164d..fee6d377f 100644 --- a/addons/ot/src/util.c +++ b/addons/ot/src/util.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "include.h" +#include "../include/include.h" #ifdef DEBUG_OT diff --git a/addons/ot/src/vars.c b/addons/ot/src/vars.c index e0c6923c4..c8d54389d 100644 --- a/addons/ot/src/vars.c +++ b/addons/ot/src/vars.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "include.h" +#include "../include/include.h" #ifdef DEBUG_OT