diff options
author | Tom Tromey <tromey@adacore.com> | 2023-09-15 10:13:24 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-09-15 10:36:15 -0600 |
commit | 0e0edacca5f34621f85e93a22ee31c6810b5941c (patch) | |
tree | 34b6d5d3221c3176dd19dfd347cf2e594ebd739c /gdbsupport | |
parent | 5490b88bfb36d23799005ee5284292d48d91cbdc (diff) | |
download | binutils-0e0edacca5f34621f85e93a22ee31c6810b5941c.zip binutils-0e0edacca5f34621f85e93a22ee31c6810b5941c.tar.gz binutils-0e0edacca5f34621f85e93a22ee31c6810b5941c.tar.bz2 |
Fix build failure with GCC 4.8
A user pointed out that the build failed with GCC 4.8. The problem
was that the form used by the std::hash specialization of ptid_t was
not accepted. This patch rewrites this code into a form that is
acceptable to the older compiler.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdbsupport')
-rw-r--r-- | gdbsupport/ptid.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdbsupport/ptid.h b/gdbsupport/ptid.h index f8644d4..96c7d9c 100644 --- a/gdbsupport/ptid.h +++ b/gdbsupport/ptid.h @@ -157,8 +157,10 @@ private: tid_type m_tid; }; +namespace std +{ template<> -struct std::hash<ptid_t> +struct hash<ptid_t> { size_t operator() (const ptid_t &ptid) const { @@ -169,6 +171,7 @@ struct std::hash<ptid_t> + long_hash (ptid.tid ())); } }; +} /* The null or zero ptid, often used to indicate no process. */ |