Cast from pthread_t to pid_t via uintptr_t.
On 64bit NetBSD, pthread_t is a pointer and pid_t is an integer so we cannot cast from pthread_t to pid_t directoly due to difference of their size. git-svn-id: https://google-glog.googlecode.com/svn/trunk@69 eb4d4688-79bd-11dd-afb4-1d65580434c0
This commit is contained in:
parent
9495564423
commit
1b5a90b691
@ -251,7 +251,7 @@ pid_t GetTID() {
|
|||||||
return GetCurrentThreadId();
|
return GetCurrentThreadId();
|
||||||
#else
|
#else
|
||||||
// If none of the techniques above worked, we use pthread_self().
|
// If none of the techniques above worked, we use pthread_self().
|
||||||
return (pid_t)pthread_self();
|
return (pid_t)(uintptr_t)pthread_self();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user