[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180228161328.3067263b@xeon-e3>
Date: Wed, 28 Feb 2018 16:13:28 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Serhey Popovych <serhe.popovych@...il.com>
Cc: netdev@...r.kernel.org, thomas.de_schampheleire@...ia.com
Subject: Re: [PATCH iproute2 2/3] ss: Fix build with old libc headers
without AF_VSOCK
On Tue, 27 Feb 2018 14:06:51 +0200
Serhey Popovych <serhe.popovych@...il.com> wrote:
> diff --git a/include/compat/libc/bits/socket.h b/include/compat/libc/bits/socket.h
> new file mode 100644
> index 0000000..25ef0d5
> --- /dev/null
> +++ b/include/compat/libc/bits/socket.h
> @@ -0,0 +1,15 @@
> +#ifndef _IP_COMPAT_BITS_SOCKET_H
> +#define _IP_COMPAT_BITS_SOCKET_H
> +
> +#include_next <bits/socket.h>
> +
> +#ifndef AF_VSOCK
> +#define PF_VSOCK 40
> +#define AF_VSOCK PF_VSOCK
> +#undef PF_MAX
> +#undef AF_MAX
> +#define PF_MAX 41
> +#define AF_MAX PF_MAX
> +#endif /* AF_VSOCK */
> +
> +#endif /* _IP_COMPAT_BITS_SOCKET_H */
It makes more sense to change ss.c to ifdef out the code related to AF_VSOCK
if it is not defined. Rather than asking for unknown address family.
Powered by blists - more mailing lists