All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2] ss: fix compilation under glibc < 2.18
@ 2019-02-20 14:41 Thomas De Schampheleire
  2019-02-21  1:53 ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas De Schampheleire @ 2019-02-20 14:41 UTC (permalink / raw)
  To: netdev; +Cc: Thomas De Schampheleire

From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>

Commit c759116a0b2b6da8df9687b0a40ac69050132c77 introduced support for
AF_VSOCK. This define is only provided since glibc version 2.18, so
compilation fails when using older toolchains.

Provide the necessary definitions if needed.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
---
 misc/ss.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/misc/ss.c b/misc/ss.c
index 9e821faf..766fdc5f 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -51,6 +51,14 @@
 #include <linux/tipc_netlink.h>
 #include <linux/tipc_sockets_diag.h>
 
+/* AF_VSOCK/PF_VSOCK is only provided since glibc 2.18 */
+#ifndef PF_VSOCK
+#define PF_VSOCK 40
+#endif
+#ifndef AF_VSOCK
+#define AF_VSOCK PF_VSOCK
+#endif
+
 #define MAGIC_SEQ 123456
 #define BUF_CHUNK (1024 * 1024)
 #define LEN_ALIGN(x) (((x) + 1) & ~1)
-- 
2.19.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH iproute2] ss: fix compilation under glibc < 2.18
  2019-02-20 14:41 [PATCH iproute2] ss: fix compilation under glibc < 2.18 Thomas De Schampheleire
@ 2019-02-21  1:53 ` Stephen Hemminger
  2019-02-21  7:43   ` Thomas De Schampheleire
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2019-02-21  1:53 UTC (permalink / raw)
  To: Thomas De Schampheleire; +Cc: netdev, Thomas De Schampheleire

On Wed, 20 Feb 2019 15:41:51 +0100
Thomas De Schampheleire <patrickdepinguin@gmail.com> wrote:

> From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> 
> Commit c759116a0b2b6da8df9687b0a40ac69050132c77 introduced support for
> AF_VSOCK. This define is only provided since glibc version 2.18, so
> compilation fails when using older toolchains.
> 
> Provide the necessary definitions if needed.
> 
> Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>

Not sure why you would want new iproute2 with a 5 year old version of glibc?
Yes that means update your tool chain.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH iproute2] ss: fix compilation under glibc < 2.18
  2019-02-21  1:53 ` Stephen Hemminger
@ 2019-02-21  7:43   ` Thomas De Schampheleire
  2019-02-21 22:49     ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas De Schampheleire @ 2019-02-21  7:43 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, Thomas De Schampheleire

El jue., 21 feb. 2019 a las 2:53, Stephen Hemminger
(<stephen@networkplumber.org>) escribió:
>
> On Wed, 20 Feb 2019 15:41:51 +0100
> Thomas De Schampheleire <patrickdepinguin@gmail.com> wrote:
>
> > From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> >
> > Commit c759116a0b2b6da8df9687b0a40ac69050132c77 introduced support for
> > AF_VSOCK. This define is only provided since glibc version 2.18, so
> > compilation fails when using older toolchains.
> >
> > Provide the necessary definitions if needed.
> >
> > Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
>
> Not sure why you would want new iproute2 with a 5 year old version of glibc?
> Yes that means update your tool chain.
>

This problem is noticed for an embedded system. It has up-to-date
applications and libraries (built via Buildroot) but the toolchain and
kernel are supplied by the SoC vendor (in this case Marvell, formerly
Cavium Networks). Unfortunately their toolchain is lagging behind and
is still using glibc 2.16.

I could handle this patch locally, but I think there may be other
people in a similar situation which would benefit from an upstream
fix.

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH iproute2] ss: fix compilation under glibc < 2.18
  2019-02-21  7:43   ` Thomas De Schampheleire
@ 2019-02-21 22:49     ` Stephen Hemminger
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2019-02-21 22:49 UTC (permalink / raw)
  To: Thomas De Schampheleire; +Cc: netdev, Thomas De Schampheleire

On Thu, 21 Feb 2019 08:43:08 +0100
Thomas De Schampheleire <patrickdepinguin@gmail.com> wrote:

> El jue., 21 feb. 2019 a las 2:53, Stephen Hemminger
> (<stephen@networkplumber.org>) escribió:
> >
> > On Wed, 20 Feb 2019 15:41:51 +0100
> > Thomas De Schampheleire <patrickdepinguin@gmail.com> wrote:
> >  
> > > From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> > >
> > > Commit c759116a0b2b6da8df9687b0a40ac69050132c77 introduced support for
> > > AF_VSOCK. This define is only provided since glibc version 2.18, so
> > > compilation fails when using older toolchains.
> > >
> > > Provide the necessary definitions if needed.
> > >
> > > Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>  
> >
> > Not sure why you would want new iproute2 with a 5 year old version of glibc?
> > Yes that means update your tool chain.
> >  
> 
> This problem is noticed for an embedded system. It has up-to-date
> applications and libraries (built via Buildroot) but the toolchain and
> kernel are supplied by the SoC vendor (in this case Marvell, formerly
> Cavium Networks). Unfortunately their toolchain is lagging behind and
> is still using glibc 2.16.
> 
> I could handle this patch locally, but I think there may be other
> people in a similar situation which would benefit from an upstream
> fix.

OK applied, just don't want to keep lots of old cruft in the code
since it can lead to future suprise bugs.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-21 22:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-20 14:41 [PATCH iproute2] ss: fix compilation under glibc < 2.18 Thomas De Schampheleire
2019-02-21  1:53 ` Stephen Hemminger
2019-02-21  7:43   ` Thomas De Schampheleire
2019-02-21 22:49     ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.