step-into-handler.c compilation failure on ppc64

Roland McGrath roland at redhat.com
Sat Dec 5 17:19:20 UTC 2009


How about this?

--- step-into-handler.c	10 Dec 2008 04:42:43 -0800	1.8
+++ step-into-handler.c	05 Dec 2009 09:18:54 -0800	
@@ -35,6 +35,7 @@
 #include <sys/time.h>
 #include <string.h>
 #include <stddef.h>
+#include <stdint.h>
 
 #if defined __x86_64__
 #define REGISTER_IP regs.rip
@@ -113,11 +114,11 @@ handler_alrm_get (void)
 {
 #if defined __powerpc64__
   /* ppc64 `handler_alrm' resolves to the function descriptor.  */
-  return *(void **) handler_alrm;
+  return *(void **) (uintptr_t) handler_alrm;
 /* __s390x__ defines both the symbols.  */
 #elif defined __s390__ && !defined __s390x__
   /* s390 bit 31 is zero here but I am not sure if it cannot be arbitrary.  */
-  return (void *) (0x7fffffff & (unsigned long) handler_alrm);
+  return (void *) (0x7fffffff & (uintptr_t) handler_alrm);
 #else
   return handler_alrm;
 #endif




More information about the utrace-devel mailing list