Error when compile-time testing against RHEL 7.4/7.5 kernels

Solution Verified - Updated -

Issue

  • What logic can I use to determine whether or not we are on a RHEL kernel at compile-time?
  • When performing compile-time testing, we encounter an issue similar to the following:
error: ‘const struct net_device_ops’ has no member named ‘ndo_change_mtu’; did you mean ‘ndo_change_mtu_rh74’?
    .ndo_change_mtu = ExgChangeMtu,
     ^~~~~~~~~~~~~~
     ndo_change_mtu_rh74

Environment

  • Red Hat Enterprise Linux 7.4
  • Red Hat Enterprise Linux 7.5
  • kernel ABI (kABI)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content