mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 00:20:22 -07:00
Fix compatibilities with unix 2.8.0.0
The version of unix removes the 3rd Maybe FileMode argument of openFd, so we need to handle this breaking change using a MIN_VERSION macro. The argument is integrated with the OpenFileFlags argument and the integrated value in defaultFileFlags is Nothing, so there's no difference between the two function calls.
This commit is contained in:
parent
ab99c17a68
commit
044d9244e5
@ -1,3 +1,4 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DeriveTraversable #-}
|
||||
{-# LANGUAGE ExistentialQuantification #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
@ -452,7 +453,11 @@ xfork x = io . forkProcess . finally nullStdin $ do
|
||||
x
|
||||
where
|
||||
nullStdin = do
|
||||
#if MIN_VERSION_unix(2,8,0)
|
||||
fd <- openFd "/dev/null" ReadOnly defaultFileFlags
|
||||
#else
|
||||
fd <- openFd "/dev/null" ReadOnly Nothing defaultFileFlags
|
||||
#endif
|
||||
dupTo fd stdInput
|
||||
closeFd fd
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user