From 5ec9d756aac1a0eb5c1f48eb110e80946b43f41a Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Sun, 1 Dec 2013 19:57:44 -0600 Subject: [PATCH] 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 --- include/dahdi/kernel.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index d13e60b..c404926 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -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 +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 @@ -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)