Skip to content

Commit 210c040

Browse files
committed
fixing rocky linux compilation issues
1 parent 2781746 commit 210c040

File tree

12 files changed

+125
-11
lines changed

12 files changed

+125
-11
lines changed

drivers/dahdi/dahdi-base.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,18 @@
8282

8383
#include "hpec/hpec_user.h"
8484

85+
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
86+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
87+
#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
93+
#else
94+
#include <stdbool.h>
95+
#endif
96+
8597
#if defined(EMPULSE) && defined(EMFLASH)
8698
#error "You cannot define both EMPULSE and EMFLASH"
8799
#endif

drivers/dahdi/voicebus/vpmoct.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@
3030
#include <linux/timer.h>
3131
#include "dahdi/kernel.h"
3232

33+
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
34+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
35+
#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
41+
#else
42+
#include <stdbool.h>
43+
#endif
44+
3345
#define VPMOCT_FIRM_HEADER_LEN 32
3446
#define VPMOCT_BOOT_RAM_LEN 128
3547
#define VPMOCT_FLASH_BUF_SECTIONS 4

drivers/dahdi/wcaxx-base.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@
3434
#include <linux/firmware.h>
3535
#include <linux/crc32.h>
3636

37+
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
38+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
39+
#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
45+
#else
46+
#include <stdbool.h>
47+
#endif
48+
3749
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
3850
/* Define this if you would like to load the modules in parallel. While this
3951
* can speed up loads when multiple cards handled by this driver are installed,

drivers/dahdi/wct4xxp/base.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@
4242
#include <linux/crc32.h>
4343
#include <linux/slab.h>
4444

45+
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
46+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
47+
#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
53+
#else
54+
#include <stdbool.h>
55+
#endif
56+
4557
#include <dahdi/kernel.h>
4658

4759
#include "wct4xxp.h"

drivers/dahdi/wct4xxp/vpm450m.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@
2929

3030
#include <dahdi/kernel.h>
3131

32+
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
33+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
34+
#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
40+
#else
41+
#include <stdbool.h>
42+
#endif
43+
3244
#include "vpm450m.h"
3345
#include <oct612x.h>
3446

drivers/dahdi/wctc4xxp/base.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@
4040
#include <linux/timer.h>
4141
#include <dahdi/kernel.h>
4242

43+
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
44+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
45+
#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
51+
#else
52+
#include <stdbool.h>
53+
#endif
54+
4355
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
4456
#include <linux/sched/signal.h>
4557
#endif /* 4.11.0 */

drivers/dahdi/wctdm24xxp/base.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ Tx Gain - W/Pre-Emphasis: -23.99 to 0.00 db
5454
#include <linux/crc32.h>
5555
#include <linux/slab.h>
5656

57+
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
58+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
59+
#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
65+
#else
66+
#include <stdbool.h>
67+
#endif
68+
5769
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
5870
/* Define this if you would like to load the modules in parallel. While this
5971
* can speed up loads when multiple cards handled by this driver are installed,

drivers/dahdi/wcte13xp-base.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@
3636
#include <linux/crc32.h>
3737
#include <dahdi/kernel.h>
3838

39+
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
40+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
41+
#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
47+
#else
48+
#include <stdbool.h>
49+
#endif
50+
3951
#include "wct4xxp/wct4xxp.h" /* For certain definitions */
4052
#include "wcxb.h"
4153
#include "wcxb_spi.h"

drivers/dahdi/wcte43x-base.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@
4343
#include <linux/firmware.h>
4444
#include <oct612x.h>
4545

46+
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
47+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
48+
#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
54+
#else
55+
#include <stdbool.h>
56+
#endif
57+
4658
#include <dahdi/kernel.h>
4759

4860
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)

drivers/dahdi/wcxb.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@
3636

3737
#include <dahdi/kernel.h>
3838

39+
/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
40+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
41+
#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
47+
#else
48+
#include <stdbool.h>
49+
#endif
50+
3951
#include "wcxb.h"
4052
#include "wcxb_spi.h"
4153
#include "wcxb_flash.h"

0 commit comments

Comments
 (0)