diff options
Diffstat (limited to 'devel/iz/files/patch-import_iz_streams.d')
-rw-r--r-- | devel/iz/files/patch-import_iz_streams.d | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/devel/iz/files/patch-import_iz_streams.d b/devel/iz/files/patch-import_iz_streams.d new file mode 100644 index 000000000000..12a022a4c3e7 --- /dev/null +++ b/devel/iz/files/patch-import_iz_streams.d @@ -0,0 +1,61 @@ +--- import/iz/streams.d 2017-04-03 03:39:24 UTC ++++ import/iz/streams.d +@@ -1049,7 +1049,12 @@ abstract class SystemStream: Stream, Str + } + version(Posix) + { +- return core.sys.posix.unistd.lseek64(_handle, offset, mode); ++ version(FreeBSD) ++ { ++ return core.sys.posix.unistd.lseek(_handle, offset, mode); ++ } else { ++ return core.sys.posix.unistd.lseek64(_handle, offset, mode); ++ } + } + } + +@@ -1085,7 +1090,12 @@ abstract class SystemStream: Stream, Str + } + version(Posix) + { +- ftruncate64(_handle, value); ++ version(FreeBSD) ++ { ++ ftruncate(_handle, value); ++ } else { ++ ftruncate64(_handle, value); ++ } + } + } + +@@ -1574,7 +1584,12 @@ class MemoryStream: Stream, StreamPersis + + scope(exit) core.sys.posix.unistd.close(hdl); + auto immutable numRead = core.sys.posix.unistd.write(hdl, _memory, _size); +- ftruncate64(hdl, _size); ++ version(FreeBSD) ++ { ++ ftruncate(hdl, _size); ++ } else { ++ ftruncate64(hdl, _size); ++ } + + if (numRead != _size) + throw new Exception(format("stream exception: '%s' is corrupted", aFilename)); +@@ -1611,8 +1626,14 @@ class MemoryStream: Stream, StreamPersis + throw new Exception(format("stream exception: cannot open '%s'", aFilename)); + + scope(exit) core.sys.posix.unistd.close(hdl); +- size(core.sys.posix.unistd.lseek64(hdl, 0, SEEK_END)); +- core.sys.posix.unistd.lseek64(hdl, 0, SEEK_SET); ++ version(FreeBSD) ++ { ++ size(core.sys.posix.unistd.lseek(hdl, 0, SEEK_END)); ++ core.sys.posix.unistd.lseek(hdl, 0, SEEK_SET); ++ } else { ++ size(core.sys.posix.unistd.lseek64(hdl, 0, SEEK_END)); ++ core.sys.posix.unistd.lseek64(hdl, 0, SEEK_SET); ++ } + const size_t numRead = core.sys.posix.unistd.read(hdl, _memory, _size); + position = 0; + |