TBF: override send function via linker option

Use --wrap linker facility to override pcu_sock_send() similar to other
Osmo* projects.

Change-Id: Ia3d436bd3d1fb0ce8e98526bd7457f4c57667ceb
This commit is contained in:
Max 2018-01-25 19:47:28 +01:00
parent 164b59d757
commit a296118e6d
2 changed files with 4 additions and 1 deletions

View File

@ -33,6 +33,7 @@ tbf_TbfTest_LDADD = \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOCORE_LIBS) \
$(COMMON_LA)
tbf_TbfTest_LDFLAGS = -Wl,--wrap=pcu_sock_send
bitcomp_BitcompTest_SOURCES = bitcomp/BitcompTest.cpp ../src/egprs_rlc_compression.cpp
bitcomp_BitcompTest_LDADD = \

View File

@ -137,7 +137,9 @@ static void test_tbf_tlli_update()
static uint8_t llc_data[200];
int pcu_sock_send(struct msgb *msg)
/* override, requires '-Wl,--wrap=pcu_sock_send' */
int __real_pcu_sock_send(struct msgb *msg);
int __wrap_pcu_sock_send(struct msgb *msg)
{
return 0;
}