Re: [PATCH] treewide: use uint* instead of u_int*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 16, 2022 at 06:16:41PM +0200, vincent@xxxxxxxxxxxx wrote:
[...]
> diff --git a/include/libipq/libipq.h b/include/libipq/libipq.h
> index 3cd13292..48c368f5 100644
> --- a/include/libipq/libipq.h
> +++ b/include/libipq/libipq.h
> @@ -48,19 +48,19 @@ typedef unsigned long ipq_id_t;
>  struct ipq_handle
>  {
>  	int fd;
> -	u_int8_t blocking;
> +	uint8_t blocking;
>  	struct sockaddr_nl local;
>  	struct sockaddr_nl peer;
>  };
>  
> -struct ipq_handle *ipq_create_handle(u_int32_t flags, u_int32_t protocol);
> +struct ipq_handle *ipq_create_handle(uint32_t flags, uint32_t protocol);

Might this break API compatibility? ABI won't change, but I suppose
users would have to include stdint.h prior to this header. Are we safe
if we change the include from sys/types.h to stdint.h in line 27 of that
file?

[...]
> diff --git a/include/linux/netfilter_arp/arpt_mangle.h b/include/linux/netfilter_arp/arpt_mangle.h
> index 250f5029..f83ad10a 100644
> --- a/include/linux/netfilter_arp/arpt_mangle.h
> +++ b/include/linux/netfilter_arp/arpt_mangle.h
> @@ -13,7 +13,7 @@ struct arpt_mangle
>  	union {
>  		struct in_addr tgt_ip;
>  	} u_t;
> -	u_int8_t flags;
> +	uint8_t flags;
>  	int target;
>  };

This is a kernel-header. The type was changed to __u8 in kernel repo, so
we should use that instead.

Thanks, Phil



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux