kni:fix build failure as "ndo_change_mtu_rh74" not found in RHEL8

Message ID 20181219060451.6827-2-xiliang@redhat.com (mailing list archive)
State Superseded, archived
Headers
Series kni:fix build failure as "ndo_change_mtu_rh74" not found in RHEL8 |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK

Commit Message

Xiao Liang Dec. 19, 2018, 6:04 a.m. UTC
  'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.

Build error log:
/home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct
net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean
‘ndo_change_mtu’?
 #define ndo_change_mtu ndo_change_mtu_rh74

                        ^~~~~~~~~~~~~~~~~~~
Signed-off-by: Xiao Liang <xiliang@redhat.com>
---
 kernel/linux/kni/compat.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 5aadebbcd..bc81d0c8d 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -103,7 +103,8 @@ 
 #endif
 
 #if (defined(RHEL_RELEASE_CODE) && \
-	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)))
+	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
 #define ndo_change_mtu ndo_change_mtu_rh74
 #endif