lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 14 Jan 2023 01:13:46 +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 3/3] marvell.c: Fix build with musl-libc

On Fri, Jan 13, 2023 at 03:31:48PM -0800, Florian Fainelli wrote:
> After commit 1fa60003a8b8 ("misc: header includes cleanup") we stopped
> including net/if.h which resolved the proper defines to pull in
> sys/types.h and provide a definition for u_int32_t. With musl-libc we
> need to define _GNU_SOURCE to ensure that sys/types.h does provide a
> definition for u_int32_t.
> 
> Fixes: 1fa60003a8b8 ("misc: header includes cleanup")
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> ---
>  marvell.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/marvell.c b/marvell.c
> index d3d570e4d4ad..be2fc36b8fc5 100644
> --- a/marvell.c
> +++ b/marvell.c
> @@ -6,7 +6,7 @@
>   */
>  
>  #include <stdio.h>
> -
> +#define _GNU_SOURCE
>  #include "internal.h"
>  
>  static void dump_addr(int n, const u8 *a)

I would prefer replacing u_intXX_t types with standard uintXX_t and
including <stdint.h>. That would be consistent with the rest of the
code which uses ISO uintXX_t types or (older code) kernel uXX types.

Michal

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ