diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2011-07-29 09:43:38 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@vyatta.com> | 2011-07-29 09:43:38 -0700 |
commit | 472427d9ab77a4d1f37285399c3789837b77d74f (patch) | |
tree | 8ca72380ded7fef5b1e2fa9d8667693b19f158b1 /src/cstore | |
parent | 2b373a58e35a5a3ec511aeae0ebf01b795ec8cd7 (diff) | |
download | vyatta-cfg-472427d9ab77a4d1f37285399c3789837b77d74f.tar.gz vyatta-cfg-472427d9ab77a4d1f37285399c3789837b77d74f.zip |
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
Diffstat (limited to 'src/cstore')
-rw-r--r-- | src/cstore/svector.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
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<sizeof(size_t)>::hash(_data, _len); +#else + // Newer glibc has different internal + return std::tr1::_Fnv_hash_base<sizeof(size_t)>::hash(_data, _len); +#endif }; std::string to_string() const { return to_string(Int2Type<RAW_CSTR_DATA>()); |