From 0bcecd62480492f36775bc90ed6e86389264c7f3 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Mon, 27 Oct 2008 15:49:09 +0000 Subject: Fix xpp compile problems on kernel < 2.6.16 Support for kernels that use the older hotplug support rather than the newer uevent. Fixes the xpp issue from #13427. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5130 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/xpp/xdefs.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/dahdi/xpp/xdefs.h') diff --git a/drivers/dahdi/xpp/xdefs.h b/drivers/dahdi/xpp/xdefs.h index 5763679..430f8ef 100644 --- a/drivers/dahdi/xpp/xdefs.h +++ b/drivers/dahdi/xpp/xdefs.h @@ -101,6 +101,7 @@ typedef char *charp; typedef unsigned char byte; #ifdef __KERNEL__ +/* Kernel versions... */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) #define KMEM_CACHE_T kmem_cache_t #else @@ -113,6 +114,13 @@ typedef unsigned char byte; kfree(p); \ } while(0); +/* + * Hotplug replaced with uevent in 2.6.16 + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) +#define OLD_HOTPLUG_SUPPORT // for older kernels +#endif + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14) #define DEVICE_ATTR_READER(name,dev,buf) \ ssize_t name(struct device *dev, struct device_attribute *attr, char *buf) -- cgit v1.2.3