summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2011-07-29 23:50:36 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2011-07-29 23:50:36 -0700
commit29f08bde17f09b5a57ac9e14df7d255344870d04 (patch)
treebaf01e0fff16faead28312588a31b3fa2d7f91c4
parent7498993ebdd06561a649fcc0fc35b3b3c27451e0 (diff)
downloadvyatta-cfg-29f08bde17f09b5a57ac9e14df7d255344870d04.tar.gz
vyatta-cfg-29f08bde17f09b5a57ac9e14df7d255344870d04.zip
Fix build on older gcc
Incorrect use of #ifdef. Gcc major version is in __GNUC__
-rw-r--r--src/cstore/svector.hpp6
1 files changed, 3 insertions, 3 deletions
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<sizeof(size_t)>::hash(_data, _len);
-#else
+#if (__GNUC__ > 4 ) || __GNUC__ == 4 && __GNUC_MINOR__ >= 6
// Newer glibc has different internal
return std::tr1::_Fnv_hash_base<sizeof(size_t)>::hash(_data, _len);
+#else
+ return std::tr1::_Fnv_hash<sizeof(size_t)>::hash(_data, _len);
#endif
};
std::string to_string() const {