Skip to content

Commit

Permalink
Fix compilation issues on Rocky Linux 9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
push143smart committed Apr 3, 2024
1 parent d885c82 commit 08fda50
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 1 deletion.
5 changes: 5 additions & 0 deletions drivers/dahdi/dahdi-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
#include <asm/types.h>
#elif defined RHEL_RELEASE_VERSION
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
#include <asm/types.h>
#endif
#else
#include <stdbool.h>
#endif
Expand Down
5 changes: 5 additions & 0 deletions drivers/dahdi/voicebus/vpmoct.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
#include <asm/types.h>
#elif defined RHEL_RELEASE_VERSION
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
#include <asm/types.h>
#endif
#else
#include <stdbool.h>
#endif
Expand Down
5 changes: 5 additions & 0 deletions drivers/dahdi/wcaxx-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
#include <asm/types.h>
#elif defined RHEL_RELEASE_VERSION
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
#include <asm/types.h>
#endif
#else
#include <stdbool.h>
#endif
Expand Down
5 changes: 5 additions & 0 deletions drivers/dahdi/wct4xxp/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
#include <asm/types.h>
#elif defined RHEL_RELEASE_VERSION
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
#include <asm/types.h>
#endif
#else
#include <stdbool.h>
#endif
Expand Down
5 changes: 5 additions & 0 deletions drivers/dahdi/wct4xxp/vpm450m.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
#include <asm/types.h>
#elif defined RHEL_RELEASE_VERSION
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
#include <asm/types.h>
#endif
#else
#include <stdbool.h>
#endif
Expand Down
6 changes: 5 additions & 1 deletion drivers/dahdi/wctc4xxp/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
#include <asm/types.h>
#elif defined RHEL_RELEASE_VERSION
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
#include <asm/types.h>
#endif
#else
#include <stdbool.h>
#endif


#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
#include <linux/sched/signal.h>
#endif /* 4.11.0 */
Expand Down
5 changes: 5 additions & 0 deletions drivers/dahdi/wctdm24xxp/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ Tx Gain - W/Pre-Emphasis: -23.99 to 0.00 db
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
#include <asm/types.h>
#elif defined RHEL_RELEASE_VERSION
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
#include <asm/types.h>
#endif
#else
#include <stdbool.h>
#endif
Expand Down
5 changes: 5 additions & 0 deletions drivers/dahdi/wcte13xp-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
#include <asm/types.h>
#elif defined RHEL_RELEASE_VERSION
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
#include <asm/types.h>
#endif
#else
#include <stdbool.h>
#endif
Expand Down
5 changes: 5 additions & 0 deletions drivers/dahdi/wcte43x-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
#include <asm/types.h>
#elif defined RHEL_RELEASE_VERSION
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
#include <asm/types.h>
#endif
#else
#include <stdbool.h>
#endif
Expand Down
5 changes: 5 additions & 0 deletions drivers/dahdi/wcxb.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
#include <asm/types.h>
#elif defined RHEL_RELEASE_VERSION
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
#include <asm/types.h>
#endif
#else
#include <stdbool.h>
#endif
Expand Down
5 changes: 5 additions & 0 deletions drivers/dahdi/wcxb_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
#include <asm/types.h>
#elif defined RHEL_RELEASE_VERSION
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
#include <asm/types.h>
#endif
#else
#include <stdbool.h>
#endif
Expand Down
8 changes: 8 additions & 0 deletions include/dahdi/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -1552,6 +1552,14 @@ static inline void *PDE_DATA(const struct inode *inode)
#endif
#endif

#ifdef RHEL_RELEASE_VERSION
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
#define netif_napi_add netif_napi_add_weight
#define PDE_DATA(i) pde_data(i)
#endif
#endif

#ifndef TIMER_DATA_TYPE
#define TIMER_DATA_TYPE struct timer_list *
#endif
Expand Down

0 comments on commit 08fda50

Please sign in to comment.