]> git.saurik.com Git - redis.git/commitdiff
compilation problem on 64bit mac os x 10.5 possibly fixed
authorantirez <antirez@gmail.com>
Tue, 1 Dec 2009 10:53:00 +0000 (11:53 +0100)
committerantirez <antirez@gmail.com>
Tue, 1 Dec 2009 10:53:00 +0000 (11:53 +0100)
redis.c

diff --git a/redis.c b/redis.c
index fb3947b76c18ed6986612874bf41498d18322415..627c4cf131a3ae574e83359278c7ee5fab12019d 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -806,7 +806,7 @@ static dictType zsetDictType = {
     NULL,                      /* val dup */
     dictEncObjKeyCompare,      /* key compare */
     dictRedisObjectDestructor, /* key destructor */
-    dictVanillaFree            /* val destructor */
+    dictVanillaFree            /* val destructor of malloc(sizeof(double)) */
 };
 
 static dictType hashDictType = {
@@ -6219,7 +6219,11 @@ static void *getMcontextEip(ucontext_t *uc) {
 #elif defined(__dietlibc__)
     return (void*) uc->uc_mcontext.eip;
 #elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)
+  #if __x86_64__
+    return (void*) uc->uc_mcontext->__ss.__rip;
+  #else
     return (void*) uc->uc_mcontext->__ss.__eip;
+  #endif
 #elif defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_6)
   #if defined(_STRUCT_X86_THREAD_STATE64) && !defined(__i386__)
     return (void*) uc->uc_mcontext->__ss.__rip;