[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230113235738.wyaf3rg63olkwixw@lion.mk-sys.cz>
Date: Sat, 14 Jan 2023 00:57:38 +0100
From: Michal Kubecek <mkubecek@...e.cz>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: netdev@...r.kernel.org, Markus Mayer <mmayer@...adcom.com>,
Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH ethtool 1/3] misc: Fix build with kernel headers < v4.11
On Fri, Jan 13, 2023 at 03:31:46PM -0800, Florian Fainelli wrote:
> Not all toolchain kernel headers may contain upstream commit
> 2618be7dccf8739b89e1906b64bd8d551af351e6 ("uapi: fix linux/if.h
> userspace compilation errors") which is included in v4.11 and onwards.
> Err on the side of caution by including sys/socket.h ahead of including
> linux/if.h.
>
> Fixes: 1fa60003a8b8 ("misc: header includes cleanup")
> Reported-by: Markus Mayer <mmayer@...adcom.com>
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> ---
> internal.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/internal.h b/internal.h
> index b80f77afa4c0..f7aaaf5229f4 100644
> --- a/internal.h
> +++ b/internal.h
> @@ -21,6 +21,7 @@
> #include <unistd.h>
> #include <endian.h>
> #include <sys/ioctl.h>
> +#include <sys/socket.h>
> #include <linux/if.h>
>
> #include "json_writer.h"
No objection but I wonder if it wouldn't make sense to add linux/if.h to
the header copies in uapi/ instead as then we could also drop the
fallback definition of ALTIFNAMSIZ and perhaps more similar hacks.
Michal
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists