Verified Commit 2a070434 authored by Thomas Haller's avatar Thomas Haller
Browse files

std-aux: add "libnm-std-aux/nm-linux-compat.h" header to avoid build errors

We have a copy of a few linux user space headers in `src/linux-headers`.
The idea is that we want to use recent kernel API, and not depend on the
kernel UAPI headers installed on the build system (and not need to
workaround that).

However, we may not be able to simply compile them, because they too
have dependencies. For example,

  ../src/linux-headers/ethtool.h:1389:2: error: implicit declaration of function '__KERNEL_DIV_ROUND_UP' [-Werror=implicit-function-declaration]
    __u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)];

As workaround, don't include headers from "linux-headers" directly,
but only include the new "libnm-std-aux/nm-linux-compat.h" adapter
header, which tries to solve these incompatibilities.

Fixes: 34d48d25 ('platform: clear all BASE types when setting advertised modes for ethernet autoneg')
parent 426491a5
Pipeline #397342 passed with stages
in 76 minutes and 19 seconds