diff --git a/lib/sigsegv.c b/lib/sigsegv.c
index 998c82768..0ddaa94a3 100644
--- a/lib/sigsegv.c
+++ b/lib/sigsegv.c
@@ -588,7 +588,12 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
      - 'ucontext_t' and 'struct __darwin_ucontext' in <sys/_structs.h>,
      - 'struct __darwin_mcontext' in <ppc/_structs.h>, and
      - 'struct __darwin_ppc_thread_state' in <mach/ppc/_structs.h>.  */
+#if !defined(_STRUCT_MCONTEXT) && !defined(_STRUCT_MCONTEXT32) && !defined(_STRUCT_MCONTEXT64)
+/* Mac OS X 10.4 and earlier omit the underscores */
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext->ss.r1
+#else
 #  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext->__ss.__r1
+#endif
 
 # endif
 
