Re: [PATCH 2/4] netlink: Fix compilation on really old platforms
Denis Kenzior <[email protected]> Thu, 9 Nov 2023 09:46:40 -0600
| Newsgroups | dev.linux.lists.ell |
|---|---|
| Message-ID | <[email protected]> |
Hi Marcel,
>> -linux_headers = linux/gpio.h
>> +linux_headers = linux/gpio.h linux/netlink.h
>
> so while we could do this, I really don’t like it. Running after upstream netlink.h changes is something I rather not keep doing. For the nl80211.h header this is semi-ok, but I rather not keep doing that for all netlink headers.
We don't really need to run after them, the EXT_ACK support has been in there fr
some time. The problem is that EXT_ACK uses a ton of other attributes missing
from linux-headers circa 2016. The missing #defines are easy enough to add to
missing.h, but the problem is this one:
+enum nlmsgerr_attrs {
+ NLMSGERR_ATTR_UNUSED,
+ NLMSGERR_ATTR_MSG,
+ NLMSGERR_ATTR_OFFS,
+ NLMSGERR_ATTR_COOKIE,
+ NLMSGERR_ATTR_POLICY,
+ NLMSGERR_ATTR_MISS_TYPE,
+ NLMSGERR_ATTR_MISS_NEST,
+
+ __NLMSGERR_ATTR_MAX,
+ NLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1
+};
That is an enumeration. Maybe we could write a configure-time test for this,
but that's a pain...
Same situation with rtnetlink.h, RTA_EXPIRES is an enum, so a configure-time
test is required.
Regards,
-Denis