Review at https://gerrit.osmocom.org/5084
Fix tests linking
Code in libbsc is using gsm48_create_mm_serv_rej() which is defined in
libcommon-cs but neither libbsc itself nor tests using it are actually
linked against libcommon-cs. Fix this by using proper include and
linking where necessary. Also change build order to make sure
libcommon-cs is built before libbsc.
Change-Id: Ib195694ef92dd6f2328ffa3a818379f3742c5084
---
M src/Makefile.am
M src/libbsc/Makefile.am
M src/libbsc/gsm_04_08_utils.c
M tests/abis/Makefile.am
M tests/nanobts_omlattr/Makefile.am
5 files changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/84/5084/1
diff --git a/src/Makefile.am b/src/Makefile.am
index dd1ad3d..454bf26 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,10 +22,10 @@
# Libraries
SUBDIRS = \
libcommon \
+ libcommon-cs \
libbsc \
libtrau \
libfilter \
- libcommon-cs \
$(NULL)
# Programs
diff --git a/src/libbsc/Makefile.am b/src/libbsc/Makefile.am
index e78bde6..fc12d05 100644
--- a/src/libbsc/Makefile.am
+++ b/src/libbsc/Makefile.am
@@ -17,6 +17,8 @@
libbsc.a \
$(NULL)
+libbsc_a_LIBADD = $(top_builddir)/src/libcommon-cs/libcommon-cs.a
+
libbsc_a_SOURCES = \
abis_nm.c \
abis_nm_vty.c \
diff --git a/src/libbsc/gsm_04_08_utils.c b/src/libbsc/gsm_04_08_utils.c
index 7fc696f..451133d 100644
--- a/src/libbsc/gsm_04_08_utils.c
+++ b/src/libbsc/gsm_04_08_utils.c
@@ -29,7 +29,7 @@
#include <osmocom/core/msgb.h>
#include <osmocom/gsm/gsm48.h>
-
+#include <osmocom/bsc/common_cs.h>
#include <osmocom/bsc/abis_rsl.h>
#include <osmocom/bsc/debug.h>
#include <osmocom/bsc/transaction.h>
diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am
index 1c5dede..8dc6248 100644
--- a/tests/abis/Makefile.am
+++ b/tests/abis/Makefile.am
@@ -27,6 +27,7 @@
abis_test_LDADD = \
$(top_builddir)/src/libbsc/libbsc.a \
$(top_builddir)/src/libcommon/libcommon.a \
+ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \
$(top_builddir)/src/libtrau/libtrau.a \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOABIS_LIBS) \
diff --git a/tests/nanobts_omlattr/Makefile.am
b/tests/nanobts_omlattr/Makefile.am
index 8b5e116..4b49518 100644
--- a/tests/nanobts_omlattr/Makefile.am
+++ b/tests/nanobts_omlattr/Makefile.am
@@ -26,6 +26,7 @@
$(top_builddir)/src/libbsc/libbsc.a \
$(top_builddir)/src/libtrau/libtrau.a \
$(top_builddir)/src/libcommon/libcommon.a \
+ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \
--
To view, visit https://gerrit.osmocom.org/5084
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib195694ef92dd6f2328ffa3a818379f3742c5084
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max <[email protected]>