From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:32864 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965144AbeCAANc (ORCPT ); Wed, 28 Feb 2018 19:13:32 -0500 Received: by mail-pf0-f193.google.com with SMTP id q13so1710142pff.0 for ; Wed, 28 Feb 2018 16:13:31 -0800 (PST) Date: Wed, 28 Feb 2018 16:13:28 -0800 From: Stephen Hemminger To: Serhey Popovych Cc: netdev@vger.kernel.org, thomas.de_schampheleire@nokia.com Subject: Re: [PATCH iproute2 2/3] ss: Fix build with old libc headers without AF_VSOCK Message-ID: <20180228161328.3067263b@xeon-e3> In-Reply-To: <1519733212-30703-3-git-send-email-serhe.popovych@gmail.com> References: <1519733212-30703-1-git-send-email-serhe.popovych@gmail.com> <1519733212-30703-3-git-send-email-serhe.popovych@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 27 Feb 2018 14:06:51 +0200 Serhey Popovych 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 > + > +#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.