diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,10 @@
+scroll (1.20250228.2) unstable; urgency=medium
+
+  * Fix build with unix < 2.8.
+    Thanks, Xavier Dectot
+
+ -- Joey Hess <id@joeyh.name>  Fri, 28 Feb 2025 15:37:49 -0400
+
 scroll (1.20250228.1) unstable; urgency=medium
 
   * Adjust scroll.cabal so hackage will accept it.
diff --git a/scroll.cabal b/scroll.cabal
--- a/scroll.cabal
+++ b/scroll.cabal
@@ -1,5 +1,5 @@
 Name: scroll
-Version: 1.20250228.1
+Version: 1.20250228.2
 Cabal-Version: 1.12
 License: GPL-2
 Maintainer: Joey Hess <id@joeyh.name>
diff --git a/unix/Pager.hs b/unix/Pager.hs
--- a/unix/Pager.hs
+++ b/unix/Pager.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 module Pager where
 
 import System.IO
@@ -20,7 +21,11 @@
 				term <- getTerminalName stdOutput
 				oldstdin <- dup stdInput
 				closeFd stdInput
+#if MIN_VERSION_unix(2,8,0)
 				newstdin <- openFd term ReadOnly defaultFileFlags 
+#else
+				newstdin <- openFd term ReadOnly Nothing defaultFileFlags 
+#endif
 				_ <- dupTo newstdin stdInput
 				Just <$> (hGetContents =<< fdToHandle oldstdin)
 			else error "stdout is not a terminal"
