From: Pablo Neira Ayuso <pablo(a)gnumonks.org>
With this patch, we check for the libtalloc version installed
in the system. We don't use our own copy in libosmocore anymore.
This patch also replaces all references to:
#include <osmocom/core/talloc.h>
by:
#include <talloc.h>
I did this with this command:
find ./ -type f -exec sed -i "s/osmocom\/core\/talloc.h/talloc.h/g" {} \;
Make sure you skip .git directory in this replacement, otherwise you'll
get a corrupted git repository.
---
src/Makefile | 2 +-
src/lower_mac/tetra_lower_mac.c | 2 +-
src/tetra-rx.c | 2 +-
src/tetra_llc.c | 2 +-
src/tetra_upper_mac.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index 38263b9..424a90e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,5 +1,5 @@
CFLAGS=-g -O0 -Wall `pkg-config --cflags libosmocore 2> /dev/null` -I.
-LDFLAGS=`pkg-config --libs libosmocore 2> /dev/null` -losmocore
+LDFLAGS=`pkg-config --libs libosmocore 2> /dev/null` -losmocore -ltalloc
all: conv_enc_test crc_test tetra-rx float_to_bits tunctl
diff --git a/src/lower_mac/tetra_lower_mac.c b/src/lower_mac/tetra_lower_mac.c
index 7b62bb4..13b3810 100644
--- a/src/lower_mac/tetra_lower_mac.c
+++ b/src/lower_mac/tetra_lower_mac.c
@@ -25,7 +25,7 @@
#include <osmocom/core/utils.h>
#include <osmocom/core/msgb.h>
-#include <osmocom/core/talloc.h>
+#include <talloc.h>
#include <tetra_common.h>
#include <tetra_tdma.h>
diff --git a/src/tetra-rx.c b/src/tetra-rx.c
index c751772..c9ed7f8 100644
--- a/src/tetra-rx.c
+++ b/src/tetra-rx.c
@@ -27,7 +27,7 @@
#include <sys/stat.h>
#include <osmocom/core/utils.h>
-#include <osmocom/core/talloc.h>
+#include <talloc.h>
#include "tetra_common.h"
#include <phy/tetra_burst.h>
diff --git a/src/tetra_llc.c b/src/tetra_llc.c
index 432f5a7..c132c8b 100644
--- a/src/tetra_llc.c
+++ b/src/tetra_llc.c
@@ -24,7 +24,7 @@
#include <string.h>
#include <osmocom/core/msgb.h>
-#include <osmocom/core/talloc.h>
+#include <talloc.h>
#include <osmocom/core/bits.h>
#include "tetra_llc_pdu.h"
diff --git a/src/tetra_upper_mac.c b/src/tetra_upper_mac.c
index 0bfc0e1..ad4e7a9 100644
--- a/src/tetra_upper_mac.c
+++ b/src/tetra_upper_mac.c
@@ -25,7 +25,7 @@
#include <osmocom/core/utils.h>
#include <osmocom/core/msgb.h>
-#include <osmocom/core/talloc.h>
+#include <talloc.h>
#include "tetra_common.h"
#include "tetra_prim.h"
--
1.7.2.5