netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Serhey Popovych <serhe.popovych@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
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
Date: Fri, 2 Mar 2018 09:57:52 +0200	[thread overview]
Message-ID: <60388182-c6fd-6583-e37b-089b004a3ff9@gmail.com> (raw)
In-Reply-To: <20180228161328.3067263b@xeon-e3>


[-- Attachment #1.1: Type: text/plain, Size: 1014 bytes --]

Stephen Hemminger wrote:
> On Tue, 27 Feb 2018 14:06:51 +0200
> Serhey Popovych <serhe.popovych@gmail.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.
> 

Yes, I did this as v0 before sending series. But now I'm thinking that
single place for all compat stuff would ease tracking of changes.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2018-03-02  7:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 12:06 [PATCH iproute2 0/3] ip: Provide compatibility bits to build with old glibc/kernel headers Serhey Popovych
2018-02-27 12:06 ` [PATCH iproute2 1/3] ip: Fix compilation with kernel headers < 3.4 Serhey Popovych
2018-02-27 17:04   ` Stephen Hemminger
2018-02-27 19:34     ` Serhey Popovych
2018-02-28 16:07       ` Stephen Hemminger
2018-03-02  7:55         ` Serhey Popovych
2018-02-27 12:06 ` [PATCH iproute2 2/3] ss: Fix build with old libc headers without AF_VSOCK Serhey Popovych
2018-03-01  0:13   ` Stephen Hemminger
2018-03-02  7:57     ` Serhey Popovych [this message]
2018-02-27 12:06 ` [PATCH iproute2 3/3] ip: Get rid of custom netinet/tcp.h Serhey Popovych

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60388182-c6fd-6583-e37b-089b004a3ff9@gmail.com \
    --to=serhe.popovych@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas.de_schampheleire@nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).