forked from Imagelibrary/binutils-gdb
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>
This commit is contained in:
@@ -157,8 +157,10 @@ private:
|
|||||||
tid_type m_tid;
|
tid_type m_tid;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace std
|
||||||
|
{
|
||||||
template<>
|
template<>
|
||||||
struct std::hash<ptid_t>
|
struct hash<ptid_t>
|
||||||
{
|
{
|
||||||
size_t operator() (const ptid_t &ptid) const
|
size_t operator() (const ptid_t &ptid) const
|
||||||
{
|
{
|
||||||
@@ -169,6 +171,7 @@ struct std::hash<ptid_t>
|
|||||||
+ long_hash (ptid.tid ()));
|
+ long_hash (ptid.tid ()));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/* The null or zero ptid, often used to indicate no process. */
|
/* The null or zero ptid, often used to indicate no process. */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user