From dc3fa929da04af20541c9fd63c9d8a9bea9dd6d5 Mon Sep 17 00:00:00 2001 From: Neil McKee Date: Thu, 14 Apr 2016 00:04:50 -0700 Subject: [PATCH] setns call appeared in Kernel 3.0.0 but only in glibc 2.14 or later, so test __GLIBC__ and __GLIBC_MINOR__ too. --- hsflowd.spec | 2 +- src/Linux/readInterfaces.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hsflowd.spec b/hsflowd.spec index 9adfc81c..d0aa7349 100644 --- a/hsflowd.spec +++ b/hsflowd.spec @@ -1,6 +1,6 @@ Summary: host sFlow daemon Name: hsflowd -Version: 1.29.2 +Version: 1.29.3 Release: 1 License: http://host-sflow.sourceforge.net/license.html Group: Applications/Internet diff --git a/src/Linux/readInterfaces.c b/src/Linux/readInterfaces.c index 4a05d7e1..d3ff3dca 100644 --- a/src/Linux/readInterfaces.c +++ b/src/Linux/readInterfaces.c @@ -667,7 +667,7 @@ VNIC: */ #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0) || (__GLIBC__ <= 2 && __GLIBC_MINOR__ < 14)) #ifndef CLONE_NEWNET #define CLONE_NEWNET 0x40000000 /* New network namespace (lo, device, names sockets, etc) */ #endif