aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-09-07 12:01:28 +0200
committerHarald Welte <laforge@gnumonks.org>2012-09-07 12:01:28 +0200
commitca0af8a3a862d5189915c02c2bc85461a3b33415 (patch)
tree7b48cbbb1ad675ce5038f7fe13b26f211a0f96e3
parenta102b63c281458c1763dfe1efeab33f00bf1b374 (diff)
libosmogb: build without strict aliasing rules
This allows us to reliably do the trick with casting structures like libgb_msgb_cb to the msgb->cb[] array. Shamelessly stolen from the Linux kernel.
-rw-r--r--libosmogb.pc.in2
-rw-r--r--src/gb/Makefile.am2
2 files changed, 2 insertions, 2 deletions
diff --git a/libosmogb.pc.in b/libosmogb.pc.in
index 4fc25472..33cacaf6 100644
--- a/libosmogb.pc.in
+++ b/libosmogb.pc.in
@@ -7,5 +7,5 @@ Name: Osmocom GPRS Gb Library
Description: Osmocom GPRS Gb Interface (NS/BSSGP) Library
Version: @VERSION@
Libs: -L${libdir} -losmogb -losmovty
-Cflags: -I${includedir}/
+Cflags: -I${includedir}/ -fno-strict-aliasing
diff --git a/src/gb/Makefile.am b/src/gb/Makefile.am
index 9d1b7862..71d47364 100644
--- a/src/gb/Makefile.am
+++ b/src/gb/Makefile.am
@@ -3,7 +3,7 @@
LIBVERSION=2:0:0
INCLUDES = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall ${GCC_FVISIBILITY_HIDDEN}
+AM_CFLAGS = -Wall ${GCC_FVISIBILITY_HIDDEN} -fno-strict-aliasing
# FIXME: this should eventually go into a milenage/Makefile.am
noinst_HEADERS = common_vty.h