You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/04/26 19:25:33 UTC

[trafficserver] branch master updated: fixes build on linunx/clang/libc++ combo

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 9473390  fixes build on linunx/clang/libc++ combo
9473390 is described below

commit 947339053cc71d53e6b88c8ae77073afacbaaac5
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Thu Apr 26 11:41:44 2018 -0700

    fixes build on linunx/clang/libc++ combo
    
    detect on C++ std library implementation
---
 lib/ts/string_view.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ts/string_view.h b/lib/ts/string_view.h
index 5b60e78..d4eca7d 100644
--- a/lib/ts/string_view.h
+++ b/lib/ts/string_view.h
@@ -1055,9 +1055,9 @@ template <class _Type, class _Traits> struct hash<ts::basic_string_view<_Type, _
   {
 // not what I would normally do.. but better than making a custom hash function at the moment.
 // This should also mean we have some consistent behavior with std code
-#if defined(__linux__)
+#if defined(__GLIBCXX__)
     return std::_Hash_impl::hash(x.data(), x.length() * sizeof(typename string_type::value_type));
-#elif defined(freebsd) || defined(darwin)
+#elif defined(_LIBCPP_VERSION)
     return __do_string_hash(x.data(), x.data() + x.size());
 #endif
   }

-- 
To stop receiving notification emails like this one, please contact
zwoop@apache.org.