Alpha OSF/1 fix
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index 94b9182..a4222cf 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -93,9 +93,12 @@
 
 long get_thread_ident _P0()
 {
+	pthread_t threadid;
 	if (!initialized)
 		init_thread();
-	return (long) pthread_self();
+	/* Jump through some hoops for Alpha OSF/1 */
+	threadid = pthread_self();
+	return (long) *(long *) &threadid;
 }
 
 static void do_exit_thread _P1(no_cleanup, int no_cleanup)