From 29f08bde17f09b5a57ac9e14df7d255344870d04 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 29 Jul 2011 23:50:36 -0700 Subject: Fix build on older gcc Incorrect use of #ifdef. Gcc major version is in __GNUC__ --- src/cstore/svector.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/cstore/svector.hpp b/src/cstore/svector.hpp index 44d67b9..1d0502e 100644 --- a/src/cstore/svector.hpp +++ b/src/cstore/svector.hpp @@ -81,11 +81,11 @@ public: return _data; }; size_t hash() const { -#if __GNUC_MAJOR__ == 4 && __GNUC_MINOR__ < 6 - return std::tr1::_Fnv_hash::hash(_data, _len); -#else +#if (__GNUC__ > 4 ) || __GNUC__ == 4 && __GNUC_MINOR__ >= 6 // Newer glibc has different internal return std::tr1::_Fnv_hash_base::hash(_data, _len); +#else + return std::tr1::_Fnv_hash::hash(_data, _len); #endif }; std::string to_string() const { -- cgit v1.2.3