From 7af154d5573eda512ff5ebc3d4fcccf678c185fd Mon Sep 17 00:00:00 2001 From: comex Date: Thu, 16 Jul 2015 16:12:35 -0400 Subject: Revert dependency. it was added in the otherwise cosmetic dfd16cc1f759a103707ebd27743abc621486e131 because I didn't change the generated code at all - just switched to the standard aliases of the functions I was already using. But I forgot that isn't present in relatively recent Xcode, so I'm switching back for now. --- lib/darwin/interpose.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'lib/darwin') diff --git a/lib/darwin/interpose.c b/lib/darwin/interpose.c index 4581bab..b0e9923 100644 --- a/lib/darwin/interpose.c +++ b/lib/darwin/interpose.c @@ -2,7 +2,6 @@ #include #include -#include #include "substitute.h" #include "substitute-internal.h" @@ -96,9 +95,8 @@ static int try_bind_section(void *bind, size_t size, void *p = (void *) (segment + offset); switch (type) { case BIND_TYPE_POINTER: { - old = atomic_exchange_explicit( - (_Atomic uintptr_t *) p, new, - memory_order_relaxed); + old = __atomic_exchange_n((uintptr_t *) p, + new, __ATOMIC_RELAXED); break; } case BIND_TYPE_TEXT_ABSOLUTE32: { @@ -107,9 +105,9 @@ static int try_bind_section(void *bind, size_t size, * this is impossible... */ substitute_panic("bad TEXT_ABSOLUTE32 rel\n"); } - old = atomic_exchange_explicit( - (_Atomic uint32_t *) p, (uint32_t) new, - memory_order_relaxed); + old = __atomic_exchange_n((uint32_t *) p, + (uint32_t) new, + __ATOMIC_RELAXED); break; } case BIND_TYPE_TEXT_PCREL32: { @@ -119,9 +117,9 @@ static int try_bind_section(void *bind, size_t size, /* ditto */ substitute_panic("bad TEXT_ABSOLUTE32 rel\n"); } - old = atomic_exchange_explicit( - (_Atomic uint32_t *) p, (uint32_t) rel, - memory_order_relaxed); + old = __atomic_exchange_n((uint32_t *) p, + (uint32_t) rel, + __ATOMIC_RELAXED); old += pc; break; } -- cgit v1.2.3