aboutsummaryrefslogtreecommitdiffstats
path: root/main/git/uclibc-index-pack.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-06-27 15:42:34 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-06-27 15:45:52 +0000
commit7bcfb77d399b529354975b5d1e61c520007847e5 (patch)
tree6c163a211f6a567989dda4a734cd2c5a9f1ec6c3 /main/git/uclibc-index-pack.patch
parent42fabce804cb3c6e031feabcfd3e66f2db741731 (diff)
downloadaports-7bcfb77d399b529354975b5d1e61c520007847e5.tar.bz2
aports-7bcfb77d399b529354975b5d1e61c520007847e5.tar.xz
main/git: workaround for uclibc non-threadsafe pread()
Seems like git triggers a bug in uclibc pread(), which appears to be non-threadsafe. We work around the issue by disabling threads in index-pack for now.
Diffstat (limited to 'main/git/uclibc-index-pack.patch')
-rw-r--r--main/git/uclibc-index-pack.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/main/git/uclibc-index-pack.patch b/main/git/uclibc-index-pack.patch
new file mode 100644
index 0000000000..c5b7ec5cf6
--- /dev/null
+++ b/main/git/uclibc-index-pack.patch
@@ -0,0 +1,14 @@
+--- ./builtin/index-pack.c.orig
++++ ./builtin/index-pack.c
+@@ -39,9 +39,10 @@
+ int ofs_first, ofs_last;
+ };
+
+-#if !defined(NO_PTHREADS) && defined(NO_PREAD)
++#if (!defined(NO_PTHREADS) && defined(NO_PREAD)) || defined(__UCLIBC__)
+ /* NO_PREAD uses compat/pread.c, which is not thread-safe. Disable threading. */
+ #define NO_PTHREADS
++
+ #endif
+
+ struct thread_local {