Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
head.hackage
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Teo Camarasu
head.hackage
Commits
9c0ab382
Commit
9c0ab382
authored
2 years ago
by
Ryan Scott
Browse files
Options
Downloads
Patches
Plain Diff
Patches adapting to unix-2.8.*
parent
0b1c7adc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
patches/acid-state-0.16.1.1.patch
+22
-0
22 additions, 0 deletions
patches/acid-state-0.16.1.1.patch
patches/warp-3.3.23.patch
+17
-0
17 additions, 0 deletions
patches/warp-3.3.23.patch
with
39 additions
and
0 deletions
patches/acid-state-0.16.1.1.patch
0 → 100644
+
22
−
0
View file @
9c0ab382
diff --git a/src-unix/FileIO.hs b/src-unix/FileIO.hs
index 667562a..fac81a5 100644
--- a/src-unix/FileIO.hs
+++ b/src-unix/FileIO.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE ForeignFunctionInterface #-}
module FileIO(FHandle,open,write,flush,close) where
import System.Posix(Fd(Fd),
@@ -16,7 +17,11 @@
data FHandle = FHandle Fd
-- should handle opening flags correctly
open :: FilePath -> IO FHandle
-open filename = fmap FHandle $ openFd filename WriteOnly (Just stdFileMode) defaultFileFlags
+open filename = fmap FHandle $ openFd filename WriteOnly
+#if !(MIN_VERSION_unix(2,8,0))
+ (Just stdFileMode)
+#endif
+ defaultFileFlags
write :: FHandle -> Ptr Word8 -> Word32 -> IO Word32
write (FHandle fd) data' length = fmap fromIntegral $ fdWriteBuf fd data' $ fromIntegral length
This diff is collapsed.
Click to expand it.
patches/warp-3.3.23.patch
0 → 100644
+
17
−
0
View file @
9c0ab382
diff --git a/Network/Wai/Handler/Warp/FdCache.hs b/Network/Wai/Handler/Warp/FdCache.hs
index 2b6ad3f..b3c997d 100644
--- a/Network/Wai/Handler/Warp/FdCache.hs
+++ b/Network/Wai/Handler/Warp/FdCache.hs
@@ -67,7 +67,11 @@
data FdEntry = FdEntry !Fd !MutableStatus
openFile :: FilePath -> IO Fd
openFile path = do
- fd <- openFd path ReadOnly Nothing defaultFileFlags{nonBlock=False}
+ fd <- openFd path ReadOnly
+#if !(MIN_VERSION_unix(2,8,0))
+ Nothing
+#endif
+ defaultFileFlags{nonBlock=False}
setFileCloseOnExec fd
return fd
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment