From: Joshua Colp Date: Wed, 11 Jul 2007 17:15:11 +0000 (+0000) Subject: Use some Makefile magic to determine if linux/compiler.h is present. (issue #10174... X-Git-Tag: 1.2.22~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7055d9fe45dc00a14151d6ad4be2148c941c60f1;p=thirdparty%2Fasterisk.git Use some Makefile magic to determine if linux/compiler.h is present. (issue #10174 reported by francesco_r) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74587 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/Makefile b/channels/Makefile index 3a277fe273..6edbbd620c 100644 --- a/channels/Makefile +++ b/channels/Makefile @@ -79,6 +79,10 @@ ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/ixjuser.h)$(wildcard CHANNEL_LIBS+=chan_phone.so endif +ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/compiler.h),) + CFLAGS+=-DHAVE_LINUX_COMPILER_H +endif + ifneq ($(wildcard h323/libchanh323.a),) CHANNEL_LIBS+=chan_h323.so endif diff --git a/channels/chan_phone.c b/channels/chan_phone.c index 669e87507d..54cadc2081 100644 --- a/channels/chan_phone.c +++ b/channels/chan_phone.c @@ -34,6 +34,9 @@ #include #include #include +#ifdef HAVE_LINUX_COMPILER_H +#include +#endif #include /* Still use some IXJ specific stuff */ #include