]> git.saurik.com Git - redis.git/commitdiff
Fixed compilation on Mac/PPC
authorKonstantin Tokarev <annulen@yandex.ru>
Thu, 1 Sep 2011 18:16:20 +0000 (22:16 +0400)
committerKonstantin Tokarev <annulen@yandex.ru>
Thu, 1 Sep 2011 18:16:20 +0000 (22:16 +0400)
Applied patch from Issue 119 provided by
pahowes@gmail.com

src/redis.c

index 6b92018df3e7b3c3cdc4cf5e46fa8a3431fa4dca..422ab4b9047b949c9c962ec37c1b6f356a68b8a1 100644 (file)
@@ -1773,8 +1773,10 @@ static void *getMcontextEip(ucontext_t *uc) {
 #elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)
   #if __x86_64__
     return (void*) uc->uc_mcontext->__ss.__rip;
-  #else
+  #elif __i386__
     return (void*) uc->uc_mcontext->__ss.__eip;
+  #else
+    return (void*) uc->uc_mcontext->__ss.__srr0;
   #endif
 #elif defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_6)
   #if defined(_STRUCT_X86_THREAD_STATE64) && !defined(__i386__)