Skip to content

Commit

Permalink
fixed compilation with Snow Leopard, thanks to Lon Baker for providin…
Browse files Browse the repository at this point in the history
…g SSH access to Snow Leopard box
  • Loading branch information
antirez committed Jul 24, 2009
1 parent fbf9bcd commit 06db1f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#ifndef __CONFIG_H
#define __CONFIG_H

#ifdef __APPLE__
#include <AvailabilityMacros.h>
#endif

/* test for malloc_size() */
#ifdef __APPLE__
#include <malloc/malloc.h>
Expand All @@ -9,7 +13,7 @@
#endif

/* define redis_fstat to fstat or fstat64() */
#ifdef __APPLE__
#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)
#define redis_fstat fstat64
#define redis_stat stat64
#else
Expand Down
4 changes: 3 additions & 1 deletion redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -4305,8 +4305,10 @@ static void *getMcontextEip(ucontext_t *uc) {
return (void*) uc->uc_mcontext.mc_eip;
#elif defined(__dietlibc__)
return (void*) uc->uc_mcontext.eip;
#elif defined(__APPLE__)
#elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)
return (void*) uc->uc_mcontext->__ss.__eip;
#elif defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_6)
return (void*) uc->uc_mcontext->__ss.__rip;
#elif defined(__i386__) || defined(__X86_64__) /* Linux x86 */
return (void*) uc->uc_mcontext.gregs[REG_EIP];
#elif defined(__ia64__) /* Linux IA64 */
Expand Down

0 comments on commit 06db1f5

Please sign in to comment.