aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-11 17:15:11 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-11 17:15:11 +0000
commit2c82f5385e779537cca162e3306f0fdcb0f635c9 (patch)
treef8310c493cf0ce6f11304e693053e69d945324b5 /channels
parent2078c8d7f4c06cff30aca59539d8102f974bcf6c (diff)
Use some Makefile magic to determine if linux/compiler.h is present. (issue #10174 reported by francesco_r)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@74587 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/Makefile4
-rw-r--r--channels/chan_phone.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/channels/Makefile b/channels/Makefile
index 3a277fe27..6edbbd620 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 669e87507..54cadc208 100644
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -34,6 +34,9 @@
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/ioctl.h>
+#ifdef HAVE_LINUX_COMPILER_H
+#include <linux/compiler.h>
+#endif
#include <linux/telephony.h>
/* Still use some IXJ specific stuff */
#include <linux/version.h>