summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-07-28 11:30:47 -0400
committerNick Mathewson <nickm@torproject.org>2020-07-28 11:30:47 -0400
commitdcc60294ad4fe349003d6aeea774d8652744358a (patch)
tree5ae89976e783b4ef1b0e601d15ae1f748dfe6c6b /src
parent564a9a54a14521ef59275fbb442f92fe385cccea (diff)
downloadtor-dcc60294ad4fe349003d6aeea774d8652744358a.tar.gz
tor-dcc60294ad4fe349003d6aeea774d8652744358a.zip
Use _lseeki64() on windows.
Fixes bug 31036; bugfix on 0.2.1.8-alpha when we moved the logging system to use posix fds.
Diffstat (limited to 'src')
-rw-r--r--src/lib/fdio/fdio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/fdio/fdio.c b/src/lib/fdio/fdio.c
index 6c87af791d..d723d04d2a 100644
--- a/src/lib/fdio/fdio.c
+++ b/src/lib/fdio/fdio.c
@@ -43,7 +43,7 @@ off_t
tor_fd_getpos(int fd)
{
#ifdef _WIN32
- return (off_t) _lseek(fd, 0, SEEK_CUR);
+ return (off_t) _lseeki64(fd, 0, SEEK_CUR);
#else
return (off_t) lseek(fd, 0, SEEK_CUR);
#endif
@@ -56,7 +56,7 @@ int
tor_fd_seekend(int fd)
{
#ifdef _WIN32
- return _lseek(fd, 0, SEEK_END) < 0 ? -1 : 0;
+ return _lseeki64(fd, 0, SEEK_END) < 0 ? -1 : 0;
#else
off_t rc = lseek(fd, 0, SEEK_END) < 0 ? -1 : 0;
#ifdef ESPIPE
@@ -75,7 +75,7 @@ int
tor_fd_setpos(int fd, off_t pos)
{
#ifdef _WIN32
- return _lseek(fd, pos, SEEK_SET) < 0 ? -1 : 0;
+ return _lseeki64(fd, pos, SEEK_SET) < 0 ? -1 : 0;
#else
return lseek(fd, pos, SEEK_SET) < 0 ? -1 : 0;
#endif