1 #include "../git-compat-util.h"
3 int read_in_full(int fd
, void *buf
, size_t count
);
5 ssize_t
git_pread(int fd
, void *buf
, size_t count
, off_t offset
)
10 current_offset
= lseek(fd
, 0, SEEK_CUR
);
12 if (lseek(fd
, offset
, SEEK_SET
) < 0)
15 rc
= read_in_full(fd
, buf
, count
);
17 if (current_offset
!= lseek(fd
, current_offset
, SEEK_SET
))