summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rwxr-xr-xcpp/src/IcePatch2/FileServerI.cpp8
-rwxr-xr-xcpp/src/IcePatch2Lib/Util.cpp8
2 files changed, 14 insertions, 2 deletions
diff --git a/cpp/src/IcePatch2/FileServerI.cpp b/cpp/src/IcePatch2/FileServerI.cpp
index 5076329b757..666b8d121de 100755
--- a/cpp/src/IcePatch2/FileServerI.cpp
+++ b/cpp/src/IcePatch2/FileServerI.cpp
@@ -105,7 +105,13 @@ IcePatch2::FileServerI::getFileCompressed_async(const AMD_FileServer_getFileComp
return;
}
- if(_lseek(fd, static_cast<off_t>(pos), SEEK_SET) != static_cast<off_t>(pos))
+ if(
+#if defined(_MSC_VER)
+ _lseek(fd, static_cast<off_t>(pos), SEEK_SET)
+#else
+ lseek(fd, static_cast<off_t>(pos), SEEK_SET)
+#endif
+ != static_cast<off_t>(pos))
{
IceUtilInternal::close(fd);
diff --git a/cpp/src/IcePatch2Lib/Util.cpp b/cpp/src/IcePatch2Lib/Util.cpp
index 3c898621c22..7540d21864f 100755
--- a/cpp/src/IcePatch2Lib/Util.cpp
+++ b/cpp/src/IcePatch2Lib/Util.cpp
@@ -965,7 +965,13 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G
while(bytesLeft > 0)
{
ByteSeq bytes(min(bytesLeft, 1024u*1024));
- if(_read(fd, &bytes[0], static_cast<unsigned int>(bytes.size())) == -1)
+ if(
+#if defined(_MSC_VER)
+ _read(fd, &bytes[0], static_cast<unsigned int>(bytes.size()))
+#else
+ read(fd, &bytes[0], static_cast<unsigned int>(bytes.size()))
+#endif
+ == -1)
{
if(doCompress)
{