From 957d92c430d1808a093489f261323cb3ee82015c Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 2 Apr 2010 01:15:18 -0400 Subject: [PATCH] fix openbsd sofia build --- libs/sofia-sip/configure.ac | 5 ++++- libs/sofia-sip/libsofia-sip-ua/sofia.am | 2 +- libs/sofia-sip/rules/sofia.am | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/sofia-sip/configure.ac b/libs/sofia-sip/configure.ac index fcedf33260..0eb2418ad9 100644 --- a/libs/sofia-sip/configure.ac +++ b/libs/sofia-sip/configure.ac @@ -100,13 +100,16 @@ if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then fi fi +SOFIA_PLAT_CFLAGS= # openbsd seems to not define NULL as a void pointer, I blame standards by committee for this. # This is a dirty hack, but shuts up all the warnings case "$host" in - *-openbsd*) SOFIA_CFLAGS="$SOFIA_CFLAGS -DNULL='(void *) 0L'";; + *-openbsd*) SOFIA_PLAT_CFLAGS="-DNULL='(void *) 0L'";; *) ;; esac +AC_SUBST(SOFIA_PLAT_CFLAGS, $SOFIA_PLAT_CFLAGS) + ### checks for header files ### ----------------------- diff --git a/libs/sofia-sip/libsofia-sip-ua/sofia.am b/libs/sofia-sip/libsofia-sip-ua/sofia.am index b5e5ec88f2..a7d8c346d6 100644 --- a/libs/sofia-sip/libsofia-sip-ua/sofia.am +++ b/libs/sofia-sip/libsofia-sip-ua/sofia.am @@ -1,7 +1,7 @@ # common Makefile targets for libsofia-sip-ua modules # --------------------------------------------------- -AM_CFLAGS = $(CWFLAG) $(SOFIA_CFLAGS) $(SOFIA_COVERAGE) +AM_CFLAGS = $(CWFLAG) $(SOFIA_CFLAGS) $(SOFIA_COVERAGE) $(SOFIA_PLAT_CFLAGS) # Use with --enable-ndebug if NDEBUG diff --git a/libs/sofia-sip/rules/sofia.am b/libs/sofia-sip/rules/sofia.am index 3d3b88f50f..a312e1355f 100644 --- a/libs/sofia-sip/rules/sofia.am +++ b/libs/sofia-sip/rules/sofia.am @@ -4,7 +4,7 @@ sofiasrcdir = ${top_srcdir}/libsofia-sip-ua sofiabuilddir = ${top_builddir}/libsofia-sip-ua -AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) $(openssl_CFLAGS) +AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) $(openssl_CFLAGS) $(SOFIA_PLAT_CFLAGS) SOFIA_COVERAGE = $(COVERAGE_FLAGS)