Skip to content

Commit 08fda50

Browse files
committed
Fix compilation issues on Rocky Linux 9.x
1 parent d885c82 commit 08fda50

File tree

12 files changed

+63
-1
lines changed

12 files changed

+63
-1
lines changed

drivers/dahdi/dahdi-base.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@
8585
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
8686
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
8787
#include <asm/types.h>
88+
#elif defined RHEL_RELEASE_VERSION
89+
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
90+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
91+
#include <asm/types.h>
92+
#endif
8893
#else
8994
#include <stdbool.h>
9095
#endif

drivers/dahdi/voicebus/vpmoct.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
3434
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
3535
#include <asm/types.h>
36+
#elif defined RHEL_RELEASE_VERSION
37+
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
38+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
39+
#include <asm/types.h>
40+
#endif
3641
#else
3742
#include <stdbool.h>
3843
#endif

drivers/dahdi/wcaxx-base.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
3838
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
3939
#include <asm/types.h>
40+
#elif defined RHEL_RELEASE_VERSION
41+
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
42+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
43+
#include <asm/types.h>
44+
#endif
4045
#else
4146
#include <stdbool.h>
4247
#endif

drivers/dahdi/wct4xxp/base.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
4646
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
4747
#include <asm/types.h>
48+
#elif defined RHEL_RELEASE_VERSION
49+
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
50+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
51+
#include <asm/types.h>
52+
#endif
4853
#else
4954
#include <stdbool.h>
5055
#endif

drivers/dahdi/wct4xxp/vpm450m.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
3333
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
3434
#include <asm/types.h>
35+
#elif defined RHEL_RELEASE_VERSION
36+
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
37+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
38+
#include <asm/types.h>
39+
#endif
3540
#else
3641
#include <stdbool.h>
3742
#endif

drivers/dahdi/wctc4xxp/base.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,15 @@
4343
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
4444
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
4545
#include <asm/types.h>
46+
#elif defined RHEL_RELEASE_VERSION
47+
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
48+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
49+
#include <asm/types.h>
50+
#endif
4651
#else
4752
#include <stdbool.h>
4853
#endif
4954

50-
5155
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
5256
#include <linux/sched/signal.h>
5357
#endif /* 4.11.0 */

drivers/dahdi/wctdm24xxp/base.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ Tx Gain - W/Pre-Emphasis: -23.99 to 0.00 db
5757
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
5858
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
5959
#include <asm/types.h>
60+
#elif defined RHEL_RELEASE_VERSION
61+
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
62+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
63+
#include <asm/types.h>
64+
#endif
6065
#else
6166
#include <stdbool.h>
6267
#endif

drivers/dahdi/wcte13xp-base.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
4040
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
4141
#include <asm/types.h>
42+
#elif defined RHEL_RELEASE_VERSION
43+
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
44+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
45+
#include <asm/types.h>
46+
#endif
4247
#else
4348
#include <stdbool.h>
4449
#endif

drivers/dahdi/wcte43x-base.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
4747
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
4848
#include <asm/types.h>
49+
#elif defined RHEL_RELEASE_VERSION
50+
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
51+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
52+
#include <asm/types.h>
53+
#endif
4954
#else
5055
#include <stdbool.h>
5156
#endif

drivers/dahdi/wcxb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
4040
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
4141
#include <asm/types.h>
42+
#elif defined RHEL_RELEASE_VERSION
43+
#if defined(RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
44+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,1)
45+
#include <asm/types.h>
46+
#endif
4247
#else
4348
#include <stdbool.h>
4449
#endif

0 commit comments

Comments
 (0)