From 88955fb5506280a82860b026f8d7db9ad57bb504 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 18 Jan 2023 18:54:00 +0100 Subject: [PATCH] Fix all references to config.h config.h is created in $(top_buildir)/config.h. Let's make sure all CPPFLAGS add correct -Ipath includes, and that all code includes the correct file. Change-Id: Ie9ea38bb009bc715b01cde4d66d181f7bec2e7bd --- src/codec/Makefile.am | 2 +- src/coding/Makefile.am | 4 +++- src/core/Makefile.am | 2 +- src/core/gsmtap_util.c | 2 +- src/core/it_q.c | 2 +- src/core/logging.c | 2 +- src/core/logging_gsmtap.c | 2 +- src/core/logging_syslog.c | 2 +- src/core/panic.c | 2 +- src/core/plugin.c | 2 +- src/core/select.c | 2 +- src/core/socket.c | 2 +- src/core/utils.c | 2 +- src/ctrl/Makefile.am | 2 +- src/gb/Makefile.am | 2 +- src/gsm/gsm0411_utils.c | 2 +- src/gsm/gsm_utils.c | 2 +- src/gsm/kdf.c | 2 +- src/gsm/mncc.c | 2 +- src/pseudotalloc/Makefile.am | 2 +- src/sim/Makefile.am | 2 +- src/usb/Makefile.am | 2 +- src/vty/Makefile.am | 2 +- src/vty/cpu_sched_vty.c | 2 +- src/vty/fsm_vty.c | 2 +- src/vty/logging_vty.c | 2 +- src/vty/stats_vty.c | 2 +- tests/Makefile.am | 2 +- tests/socket/socket_sctp_test.c | 2 +- tests/socket/socket_test.c | 2 +- tests/timer/timer_test.c | 2 +- utils/osmo-stat-dummy/osmo-stat-dummy.c | 2 +- 32 files changed, 34 insertions(+), 32 deletions(-) diff --git a/src/codec/Makefile.am b/src/codec/Makefile.am index c16ce9ad3..f05ac1f79 100644 --- a/src/codec/Makefile.am +++ b/src/codec/Makefile.am @@ -3,7 +3,7 @@ # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html LIBVERSION=3:1:3 -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) AM_CFLAGS = -Wall $(TALLOC_CFLAGS) if ENABLE_PSEUDOTALLOC diff --git a/src/coding/Makefile.am b/src/coding/Makefile.am index d856918c7..42b16e80f 100644 --- a/src/coding/Makefile.am +++ b/src/coding/Makefile.am @@ -5,7 +5,9 @@ LIBVERSION=2:0:2 AM_CPPFLAGS = \ -I"$(top_srcdir)/include" \ - -I"$(top_builddir)/include" + -I"$(top_builddir)/include" \ + -I"$(top_builddir)" \ + $(NULL) AM_CFLAGS = -Wall $(TALLOC_CFLAGS) if ENABLE_PSEUDOTALLOC diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 2cfb28106..9b812cefe 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -3,7 +3,7 @@ # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html LIBVERSION=19:0:0 -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) AM_CFLAGS = -Wall $(TALLOC_CFLAGS) $(PTHREAD_CFLAGS) $(LIBSCTP_CFLAGS) $(LIBMNL_CFLAGS) if ENABLE_PSEUDOTALLOC diff --git a/src/core/gsmtap_util.c b/src/core/gsmtap_util.c index 2571b8590..cb7538b64 100644 --- a/src/core/gsmtap_util.c +++ b/src/core/gsmtap_util.c @@ -19,7 +19,7 @@ * */ -#include "../config.h" +#include "config.h" #include #include diff --git a/src/core/it_q.c b/src/core/it_q.c index fda6c1ffd..a3ff420c8 100644 --- a/src/core/it_q.c +++ b/src/core/it_q.c @@ -32,7 +32,7 @@ * and call a queue-specific callback function. */ -#include "../config.h" +#include "config.h" #ifdef HAVE_SYS_EVENTFD_H diff --git a/src/core/logging.c b/src/core/logging.c index ce42e4c91..938c65f29 100644 --- a/src/core/logging.c +++ b/src/core/logging.c @@ -25,7 +25,7 @@ * * \file logging.c */ -#include "../config.h" +#include "config.h" #include #include diff --git a/src/core/logging_gsmtap.c b/src/core/logging_gsmtap.c index cc95388fe..dfd059b70 100644 --- a/src/core/logging_gsmtap.c +++ b/src/core/logging_gsmtap.c @@ -27,7 +27,7 @@ * @{ * \file logging_gsmtap.c */ -#include "../config.h" +#include "config.h" #include #include diff --git a/src/core/logging_syslog.c b/src/core/logging_syslog.c index 20908564d..1153bdf42 100644 --- a/src/core/logging_syslog.c +++ b/src/core/logging_syslog.c @@ -22,7 +22,7 @@ * @{ * \file logging_syslog.c */ -#include "../config.h" +#include "config.h" #ifdef HAVE_SYSLOG_H diff --git a/src/core/panic.c b/src/core/panic.c index 6c9252292..bbf6d0815 100644 --- a/src/core/panic.c +++ b/src/core/panic.c @@ -27,7 +27,7 @@ #include #include -#include "../config.h" +#include "config.h" static osmo_panic_handler_t osmo_panic_handler = (void*)0; diff --git a/src/core/plugin.c b/src/core/plugin.c index 5f44a4073..687ad406d 100644 --- a/src/core/plugin.c +++ b/src/core/plugin.c @@ -23,7 +23,7 @@ * @{ * \file plugin.c */ -#include "../config.h" +#include "config.h" #if HAVE_DLFCN_H diff --git a/src/core/select.c b/src/core/select.c index 026d4572c..72f794f33 100644 --- a/src/core/select.c +++ b/src/core/select.c @@ -36,7 +36,7 @@ #include #include -#include "../config.h" +#include "config.h" #if defined(HAVE_SYS_SELECT_H) && defined(HAVE_POLL_H) #include diff --git a/src/core/socket.c b/src/core/socket.c index ee49c2796..43736e086 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -17,7 +17,7 @@ * */ -#include "../config.h" +#include "config.h" /*! \addtogroup socket * @{ diff --git a/src/core/utils.c b/src/core/utils.c index 2012b7400..231b65c9e 100644 --- a/src/core/utils.c +++ b/src/core/utils.c @@ -459,7 +459,7 @@ char *osmo_osmo_hexdump_nospc(const unsigned char *buf, int len) __attribute__((weak, alias("osmo_hexdump_nospc"))); #endif -#include "../config.h" +#include "config.h" #ifdef HAVE_CTYPE_H #include /*! Convert an entire string to lower case diff --git a/src/ctrl/Makefile.am b/src/ctrl/Makefile.am index 20de7d6ed..31340791b 100644 --- a/src/ctrl/Makefile.am +++ b/src/ctrl/Makefile.am @@ -3,7 +3,7 @@ # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html LIBVERSION=7:0:7 -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) AM_CFLAGS = -Wall $(TALLOC_CFLAGS) if ENABLE_CTRL diff --git a/src/gb/Makefile.am b/src/gb/Makefile.am index 32a03c83e..1a2693952 100644 --- a/src/gb/Makefile.am +++ b/src/gb/Makefile.am @@ -3,7 +3,7 @@ # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html LIBVERSION=14:0:0 -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) AM_CFLAGS = -Wall -fno-strict-aliasing \ $(TALLOC_CFLAGS) \ $(LIBMNL_CFLAGS) \ diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c index ccefe546b..c26cd8250 100644 --- a/src/gsm/gsm0411_utils.c +++ b/src/gsm/gsm0411_utils.c @@ -27,7 +27,7 @@ * */ -#include "../../config.h" +#include "config.h" #include #include diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index bbc7dd64e..48341ae5d 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -92,7 +92,7 @@ #include #include -#include "../../config.h" +#include "config.h" #if (!EMBEDDED) /* FIXME: this can be removed once we bump glibc requirements to 2.25: */ diff --git a/src/gsm/kdf.c b/src/gsm/kdf.c index 6982f6f7c..4113aada0 100644 --- a/src/gsm/kdf.c +++ b/src/gsm/kdf.c @@ -22,7 +22,7 @@ #include #include -#include "../../config.h" +#include "config.h" #if (USE_GNUTLS) #include #include diff --git a/src/gsm/mncc.c b/src/gsm/mncc.c index 938cf9a6c..8a7dc4d60 100644 --- a/src/gsm/mncc.c +++ b/src/gsm/mncc.c @@ -20,7 +20,7 @@ * */ -#include "../config.h" +#include "config.h" #ifdef HAVE_SYS_SOCKET_H diff --git a/src/pseudotalloc/Makefile.am b/src/pseudotalloc/Makefile.am index 1b8618361..030b281b2 100644 --- a/src/pseudotalloc/Makefile.am +++ b/src/pseudotalloc/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I. -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CPPFLAGS = -I. -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) AM_CFLAGS = -Wall if ENABLE_PSEUDOTALLOC diff --git a/src/sim/Makefile.am b/src/sim/Makefile.am index 51424c72e..dee59bb2e 100644 --- a/src/sim/Makefile.am +++ b/src/sim/Makefile.am @@ -3,7 +3,7 @@ # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html LIBVERSION=3:1:1 -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) AM_CFLAGS = -fPIC -Wall $(TALLOC_CFLAGS) AM_LDFLAGS = $(COVERAGE_LDFLAGS) diff --git a/src/usb/Makefile.am b/src/usb/Makefile.am index b097aa750..c7d7a2a28 100644 --- a/src/usb/Makefile.am +++ b/src/usb/Makefile.am @@ -3,7 +3,7 @@ # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html LIBVERSION=0:1:0 -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) AM_CFLAGS = -fPIC -Wall $(LIBUSB_CFLAGS) $(TALLOC_CFLAGS) AM_LDFLAGS = $(COVERAGE_LDFLAGS) diff --git a/src/vty/Makefile.am b/src/vty/Makefile.am index c2d133aeb..3da091978 100644 --- a/src/vty/Makefile.am +++ b/src/vty/Makefile.am @@ -3,7 +3,7 @@ # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html LIBVERSION=11:0:2 -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) AM_CFLAGS = -Wall $(TALLOC_CFLAGS) $(PTHREAD_CFLAGS) if ENABLE_VTY diff --git a/src/vty/cpu_sched_vty.c b/src/vty/cpu_sched_vty.c index 301e7a69f..7198f747c 100644 --- a/src/vty/cpu_sched_vty.c +++ b/src/vty/cpu_sched_vty.c @@ -25,7 +25,7 @@ #define _GNU_SOURCE -#include "../../config.h" +#include "config.h" #include #include diff --git a/src/vty/fsm_vty.c b/src/vty/fsm_vty.c index 777d38ce0..da6038fab 100644 --- a/src/vty/fsm_vty.c +++ b/src/vty/fsm_vty.c @@ -19,7 +19,7 @@ #include #include -#include "../../config.h" +#include "config.h" #include #include diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 59c8a9cd5..2a074222d 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -20,7 +20,7 @@ #include #include -#include "../../config.h" +#include "config.h" #include #include diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 299ec244d..f940018ff 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -21,7 +21,7 @@ #include #include -#include "../../config.h" +#include "config.h" #include #include diff --git a/tests/Makefile.am b/tests/Makefile.am index f0eaaca4c..78666e9d4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) AM_CFLAGS = -Wall $(TALLOC_CFLAGS) $(PTHREAD_CFLAGS) AM_LDFLAGS = -no-install LDADD = $(top_builddir)/src/core/libosmocore.la $(TALLOC_LIBS) $(PTHREAD_LIBS) diff --git a/tests/socket/socket_sctp_test.c b/tests/socket/socket_sctp_test.c index b318fe5d1..e099be92c 100644 --- a/tests/socket/socket_sctp_test.c +++ b/tests/socket/socket_sctp_test.c @@ -31,7 +31,7 @@ #include #include -#include "../config.h" +#include "config.h" void *ctx = NULL; diff --git a/tests/socket/socket_test.c b/tests/socket/socket_test.c index b3b9584ad..ddb692685 100644 --- a/tests/socket/socket_test.c +++ b/tests/socket/socket_test.c @@ -32,7 +32,7 @@ #include #include -#include "../config.h" +#include "config.h" void *ctx = NULL; diff --git a/tests/timer/timer_test.c b/tests/timer/timer_test.c index b06c77409..9c51ad94d 100644 --- a/tests/timer/timer_test.c +++ b/tests/timer/timer_test.c @@ -29,7 +29,7 @@ #include #include -#include "../config.h" +#include "config.h" static void main_timer_fired(void *data); static void secondary_timer_fired(void *data); diff --git a/utils/osmo-stat-dummy/osmo-stat-dummy.c b/utils/osmo-stat-dummy/osmo-stat-dummy.c index d8036e402..37da7b32a 100644 --- a/utils/osmo-stat-dummy/osmo-stat-dummy.c +++ b/utils/osmo-stat-dummy/osmo-stat-dummy.c @@ -36,7 +36,7 @@ #include #include -#include "../../config.h" +#include "config.h" void *tall_statdummy_ctx = NULL; static bool quit = false;