From 472427d9ab77a4d1f37285399c3789837b77d74f Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 29 Jul 2011 09:43:38 -0700 Subject: Fix build of config backend on Glibc 4.6 Bug 7188 The problem is that vyatta cfg backend is using internals of c++ templates (in std::tr1) and these will change between versions of glibc. Workaround by adding necessary conditional compilation --- src/cstore/svector.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cstore') diff --git a/src/cstore/svector.hpp b/src/cstore/svector.hpp index bc04fdc..44d67b9 100644 --- a/src/cstore/svector.hpp +++ b/src/cstore/svector.hpp @@ -81,7 +81,12 @@ public: return _data; }; size_t hash() const { +#if __GNUC_MAJOR__ == 4 && __GNUC_MINOR__ < 6 return std::tr1::_Fnv_hash::hash(_data, _len); +#else + // Newer glibc has different internal + return std::tr1::_Fnv_hash_base::hash(_data, _len); +#endif }; std::string to_string() const { return to_string(Int2Type()); -- cgit v1.2.3