Merge branch 'nd/index-pack-one-fd-per-thread'
authorJunio C Hamano <gitster@pobox.com>
Tue, 3 Jun 2014 19:06:42 +0000 (12:06 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Jun 2014 19:06:42 +0000 (12:06 -0700)
Enable threaded index-pack on platforms without thread-unsafe
pread() emulation.

* nd/index-pack-one-fd-per-thread:
index-pack: work around thread-unsafe pread()

1  2 
Makefile
builtin/index-pack.c
config.mak.uname
diff --cc Makefile
Simple merge
index 1bac0f533b1f8e16714b254b1dfe11d6a8f7fd9d,ed489bbe9aab3ae7268f139f2d34c737880be49c..87d8dd81cc4c24ecf7feee932bc8b39a826bb55d
@@@ -542,7 -549,7 +549,7 @@@ static void *unpack_data(struct object_
  
        do {
                ssize_t n = (len < 64*1024) ? len : 64*1024;
-               n = xpread(pack_fd, inbuf, n, from);
 -              n = pread(get_thread_data()->pack_fd, inbuf, n, from);
++              n = xpread(get_thread_data()->pack_fd, inbuf, n, from);
                if (n < 0)
                        die_errno(_("cannot pread pack file"));
                if (!n)
Simple merge