Skip to content

Commit 08ba509

Browse files
committed
Support: Use a 64-bit seek in raw_fd_ostream::seek().
llvm-svn: 289184
1 parent 26186c7 commit 08ba509

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

llvm/lib/Support/raw_ostream.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,11 @@ void raw_fd_ostream::close() {
598598
uint64_t raw_fd_ostream::seek(uint64_t off) {
599599
assert(SupportsSeeking && "Stream does not support seeking!");
600600
flush();
601-
pos = ::lseek(FD, off, SEEK_SET);
601+
#ifdef LLVM_ON_WIN32
602+
pos = ::_lseeki64(FD, off, SEEK_SET);
603+
#else
604+
pos = ::lseek64(FD, off, SEEK_SET);
605+
#endif
602606
if (pos == (uint64_t)-1)
603607
error_detected();
604608
return pos;

0 commit comments

Comments
 (0)