summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-03-23 14:55:14 -0400
committerMoritz Angermann <moritz.angermann@gmail.com>2021-04-29 01:54:27 -0400
commitfa0888718ddf74586da6e42bda662340e6f0e1c5 (patch)
tree150de2f6fb51ea56848128d311dd3d458cfc7557
parent3c8b1f3eb4beda49548b048d2ca142f1a9d9e5c6 (diff)
downloadhaskell-fa0888718ddf74586da6e42bda662340e6f0e1c5.tar.gz
base: Enable large file support for OFD locking impl.wip/backports-8.10
Not only is this a good idea in general but this should also avoid issue #17950 by ensuring that off_t is 64-bits. (cherry picked from commit 9853fc5e3556e733b56976b0a2fce9e82130a9ef)
-rw-r--r--libraries/base/GHC/IO/Handle/Lock/LinuxOFD.hsc3
1 files changed, 3 insertions, 0 deletions
diff --git a/libraries/base/GHC/IO/Handle/Lock/LinuxOFD.hsc b/libraries/base/GHC/IO/Handle/Lock/LinuxOFD.hsc
index 5e4e642009..826656c936 100644
--- a/libraries/base/GHC/IO/Handle/Lock/LinuxOFD.hsc
+++ b/libraries/base/GHC/IO/Handle/Lock/LinuxOFD.hsc
@@ -12,6 +12,9 @@ module GHC.IO.Handle.Lock.LinuxOFD where
import GHC.Base () -- Make implicit dependency known to build system
#else
+-- Not only is this a good idea but it also works around #17950.
+#define _FILE_OFFSET_BITS 64
+
#include <unistd.h>
#include <fcntl.h>