dahdi: CentOS 6.5 backported PDE_DATA definition.

This will fix the "error: redefinition of 'PDE_DATA'" error when compiling.

Internal-Issue-ID: DAHLIN-330
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
This commit is contained in:
Shaun Ruffell
2013-12-01 19:57:44 -06:00
parent 4bfdd8bea5
commit 5ec9d756aa

View File

@@ -1404,6 +1404,17 @@ static inline short dahdi_txtone_nextsample(struct dahdi_chan *ss)
/*! Maximum audio mask */
#define DAHDI_FORMAT_AUDIO_MASK ((1 << 16) - 1)
#ifdef RHEL_RELEASE_VERSION
# if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(6, 5)
# ifdef CONFIG_PROC_FS
#include <linux/proc_fs.h>
static inline void *PDE_DATA(const struct inode *inode)
{
return PDE(inode)->data;
}
# endif
# endif
#else
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
#ifdef CONFIG_PROC_FS
#include <linux/proc_fs.h>
@@ -1412,6 +1423,7 @@ static inline void *PDE_DATA(const struct inode *inode)
return PDE(inode)->data;
}
#endif
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
#define KERN_CONT ""
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)