Skip to content

Commit

Permalink
kernel.h: Fix netif_napi_add API arguments for RHEL.
Browse files Browse the repository at this point in the history
Commit 08fda50 fixed
this issue for some versions of RHEL, but not all of them,
and in particular did not fix the issue on RHEL 8 past
8.8. This improves the targeting for RHEL for a more
comprehensive fix.

Resolves: asterisk#38
  • Loading branch information
InterLinked1 committed Sep 19, 2024
1 parent d932d9f commit 24659bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/dahdi/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
#define netif_napi_add netif_napi_add_weight
#elif defined(RHEL_RELEASE_VERSION)
#if defined(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 2) || RHEL_MAJOR == 8 && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 8)))
#define netif_napi_add netif_napi_add_weight
#endif /* RHEL_RELEASE_CODE */
#endif

#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
Expand Down Expand Up @@ -1555,7 +1559,6 @@ static inline void *PDE_DATA(const struct inode *inode)
#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
Expand Down

0 comments on commit 24659bf

Please sign in to comment.