diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2009-01-02 21:48:40 -0800 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2009-01-02 21:48:40 -0800 |
commit | 51eb2f90a1469542799823e0f3249520bf8f9cf3 (patch) | |
tree | a0571e5b921af9cc8aeaf14688ee22fe9146371f /src/thread-utils.h | |
parent | 11bb049bdddf1d203dfe8fd6031c4dba328a7525 (diff) | |
download | libgit2-51eb2f90a1469542799823e0f3249520bf8f9cf3.tar.gz |
Change the use of asm/atomic.h to require -DGIT_HAS_ASM_ATOMIC
These headers aren't always available; they typically come from the
Linux kernel, but aren't supposed to be exported into the userspace
/usr/include. Modern kernels won't install these and some distros
rm -rf the directory post kernel header install.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'src/thread-utils.h')
-rw-r--r-- | src/thread-utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread-utils.h b/src/thread-utils.h index f8ed08a88..99228417f 100644 --- a/src/thread-utils.h +++ b/src/thread-utils.h @@ -9,7 +9,7 @@ typedef pthread_mutex_t git_lck; # define gitlck_unlock(a) pthread_mutex_unlock(a) # define gitlck_free(a) pthread_mutex_destroy(a) -# if defined(__GLIBC__) +# if defined(GIT_HAS_ASM_ATOMIC) # include <asm/atomic.h> typedef atomic_t git_refcnt; # define gitrc_init(a) atomic_set(a, 0) |