Re: [PATCH net-next v3 08/11] tools: ynl: add sample for wireguard

From: Jason A. Donenfeld

Date: Tue Nov 18 2025 - 10:21:16 EST


On Wed, Nov 05, 2025 at 06:32:17PM +0000, Asbjørn Sloth Tønnesen wrote:
> +CFLAGS_wireguard:=$(call get_hdr_inc,_LINUX_WIREGUARD_H,wireguard.h) \
> + -D _WG_UAPI_WIREGUARD_H # alternate pre-YNL guard

I don't totally grok what's going on here. As I understand it, this
makefile creates `wireguard-user.h` in the generated/ include path,
which has all the various netlink wrapper declarations. And then this
also references, somehow, include/uapi/linux/wireguard.h, for the constants.
For some reason, you're then defining _WG_UAPI_WIREGUARD_H here, so that
wireguard.h from /usr/include doesn't clash. But also, why would it?
Isn't this just a matter of placing $(src)/include/uapi earlier in the
include file path?

Jason