mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-04 04:49:18 +00:00
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>
This commit is contained in:
parent
11bb049bdd
commit
51eb2f90a1
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user