diff options
-rw-r--r-- | System/Sendfile.hsc | 2 | ||||
-rw-r--r-- | include/HsUnix.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/System/Sendfile.hsc b/System/Sendfile.hsc index 8b191e2..08a606b 100644 --- a/System/Sendfile.hsc +++ b/System/Sendfile.hsc @@ -52,7 +52,7 @@ sendfile :: Fd -- ^ Input sendfile _inFd _outFd _startpos 0 = return () sendfile inFd outFd startpos count = -#ifdef HAVE_LINUX_SENDFILE +#if defined(HAVE_LINUX_SENDFILE) && !defined(__USE_FILE_OFFSET64) do offsetptr <- malloc poke offsetptr (fromIntegral startpos) diff --git a/include/HsUnix.h b/include/HsUnix.h index 559a2ce..9c60b1f 100644 --- a/include/HsUnix.h +++ b/include/HsUnix.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: HsUnix.h,v 1.9 2003/05/08 16:00:20 ross Exp $ + * $Id: HsUnix.h,v 1.10 2003/05/28 12:36:29 stolz Exp $ * * (c) The University of Glasgow 2002 * @@ -67,8 +67,10 @@ #include <sys/uio.h> #endif #ifdef HAVE_LINUX_SENDFILE +#if !defined(__USE_FILE_OFFSET64) #include <sys/sendfile.h> #endif +#endif #ifdef HAVE_FRAMEWORK_HASKELLSUPPORT #include <HaskellSupport/dlfcn.h> |