summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlhchavez <lhchavez@lhchavez.com>2020-10-13 08:02:59 -0700
committerlhchavez <lhchavez@lhchavez.com>2020-10-13 08:04:49 -0700
commitfa3daa8259df6c09a7e075b0b959eabc791f92f9 (patch)
tree1325094ce2580306b18ff84f2b1f6238f9ebfa5f
parent7f4fa178629d559c037a1f72f79f79af9c1ef8ce (diff)
downloadlibgit2-fa3daa8259df6c09a7e075b0b959eabc791f92f9.tar.gz
Define `git___load` when building with `-DTHREADSAFE=OFF`
This should allow folks that build in non-thread-safe environments to still be able to build the library. Fixes: #5663
-rw-r--r--src/thread-utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/thread-utils.h b/src/thread-utils.h
index ecb4909f5..3311672b4 100644
--- a/src/thread-utils.h
+++ b/src/thread-utils.h
@@ -311,6 +311,11 @@ GIT_INLINE(volatile void *) git___swap(
return old;
}
+GIT_INLINE(volatile void *) git___load(void * volatile *ptr)
+{
+ return *ptr;
+}
+
#ifdef GIT_ARCH_64
GIT_INLINE(int64_t) git_atomic64_add(git_atomic64 *a, int64_t addend)