From 39a36cb99a6dba1441a7a4b51914e0dadf3a7ae8 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Wed, 20 Jul 2011 12:57:59 +0200 Subject: [PATCH] Make LCR compile with latest osmocomBB code. The libosmocore structure has changed. --- Makefile.am | 3 ++- gsm_ms.cpp | 9 +++++---- gsm_ms.h | 3 +++ main.c | 7 +++++-- socket_server.c | 3 +++ 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index 376b069..0da7bb0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -78,7 +78,8 @@ GSM_LIB += ./layer23/src/mobile/libmobile.a \ ./layer23/src/common/liblayer23.a \ ./libosmocore/build-host/src/.libs/libosmocore.a \ ./libosmocore/build-host/src/vty/.libs/libosmovty.a \ - ./libosmocore/build-host/src/codec/.libs/libosmocodec.a + ./libosmocore/build-host/src/codec/.libs/libosmocodec.a \ + ./libosmocore/build-host/src/gsm/.libs/libosmogsm.a endif diff --git a/gsm_ms.cpp b/gsm_ms.cpp index 481a4ac..b586f30 100644 --- a/gsm_ms.cpp +++ b/gsm_ms.cpp @@ -18,9 +18,9 @@ extern "C" { #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -34,6 +34,7 @@ short vty_port = 4247; struct llist_head ms_list; struct log_target *stderr_target; void *l23_ctx = NULL; +struct gsmtap_inst *gsmtap_inst; static int dtmf_timeout(struct lcr_timer *timer, void *instance, int index); @@ -913,7 +914,7 @@ int handle_gsm_ms(int *_quit) if (quit && llist_empty(&ms_list)) *_quit = 1; // debug_reset_context(); - if (bsc_select_main(1)) /* polling */ + if (osmo_select_main(1)) /* polling */ work = 1; return work; diff --git a/gsm_ms.h b/gsm_ms.h index 822f0a6..e30f2fd 100644 --- a/gsm_ms.h +++ b/gsm_ms.h @@ -1,3 +1,6 @@ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif extern "C" { #include #include diff --git a/main.c b/main.c index 1aa2d8b..6eb2b68 100644 --- a/main.c +++ b/main.c @@ -10,10 +10,13 @@ \*****************************************************************************/ #include "main.h" +#ifdef PACKAGE_VERSION +#undef PACKAGE_VERSION +#endif #include "config.h" #ifdef WITH_GSM_MS extern "C" { -#include +#include } #endif @@ -156,7 +159,7 @@ void sighandler(int sigset) #ifdef WITH_GSM_MS if (!wait_ms) { wait_ms = 1; - dispatch_signal(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL); + osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL); return; } #endif diff --git a/socket_server.c b/socket_server.c index 32c6e71..9a774b6 100644 --- a/socket_server.c +++ b/socket_server.c @@ -13,6 +13,9 @@ #include #include #include +#ifdef PACKAGE_VERSION +#undef PACKAGE_VERSION +#endif #include "config.h" -- 2.13.6