All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org, Markus Mayer <mmayer@broadcom.com>,
	Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH ethtool 1/3] misc: Fix build with kernel headers < v4.11
Date: Sat, 14 Jan 2023 00:57:38 +0100	[thread overview]
Message-ID: <20230113235738.wyaf3rg63olkwixw@lion.mk-sys.cz> (raw)
In-Reply-To: <20230113233148.235543-2-f.fainelli@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]

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@broadcom.com>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2023-01-13 23:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 23:31 [PATCH ethtool 0/3] Build fixes for older kernel headers and musl Florian Fainelli
2023-01-13 23:31 ` [PATCH ethtool 1/3] misc: Fix build with kernel headers < v4.11 Florian Fainelli
2023-01-13 23:57   ` Michal Kubecek [this message]
2023-01-14  0:11     ` Florian Fainelli
2023-01-14  2:07       ` Florian Fainelli
2023-01-13 23:31 ` [PATCH ethtool 2/3] netlink: Fix maybe uninitialized 'meters' variable Florian Fainelli
2023-01-14  0:09   ` Michal Kubecek
2023-01-14  0:12     ` Florian Fainelli
2023-01-13 23:31 ` [PATCH ethtool 3/3] marvell.c: Fix build with musl-libc Florian Fainelli
2023-01-14  0:13   ` Michal Kubecek
2023-01-14  2:07     ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230113235738.wyaf3rg63olkwixw@lion.mk-sys.cz \
    --to=mkubecek@suse.cz \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=mmayer@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.