Re: [PATCH] uapi/if_arp.h: guard struct definition to not redefine libc's definitions

From: Jakub Kicinski
Date: Tue Sep 10 2024 - 20:27:11 EST


On Mon, 9 Sep 2024 11:28:55 +0200 jane400 wrote:

Could you please update the From fields in the email / the author of
the patch to have your full name like the sign off? Right now it says:

From: jane400 <jane400@xxxxxxxxxxxxxxxx>

> musl libc defines the structs arpreq, arpreq_old and arphdr in

Could you add some reference to when the structs were added to musl?
Web link, or a version number, perhaps?

> diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
> index 8254c937c9f4..e722c213f18b 100644
> --- a/include/uapi/linux/libc-compat.h
> +++ b/include/uapi/linux/libc-compat.h
> @@ -194,6 +194,14 @@
> #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
> #endif
>
> +/* Definitions for if_arp.h */
> +#ifndef __UAPI_DEF_IF_ARP_ARPREQ
> +#define __UAPI_DEF_IF_ARP_ARPREQ 1
> +#endif
> +#ifndef __UAPI_DEF_IF_ARP_ARPHDR
> +#define __UAPI_DEF_IF_ARP_ARPHDR 1
> +#endif
> +
> /* Definitions for in.h */
> #ifndef __UAPI_DEF_IN_ADDR
> #define __UAPI_DEF_IN_ADDR 1
>
> base-commit: 89f5e14d05b4852db5ecdf222dc6a13edc633658

The code change looks almost good, I think you're missing the code for
handling getting included after the user space, tho? look around how
existing definitions are handled..
--
pw-bot: cr