diff --git a/unix.cabal b/unix.cabal
index 24b91fb8949d8abe3940f7c534373ccbff64b203..cc3358742a1a2547847ec40974e0dd0fc144f788 100644
--- a/unix.cabal
+++ b/unix.cabal
@@ -48,7 +48,9 @@ Library
         System.Posix.Semaphore
         System.Posix.SharedMem
     build-depends:	base >= 4.2 && < 4.4
-    extensions:	CPP, ForeignFunctionInterface, EmptyDataDecls
+    extensions: CPP, ForeignFunctionInterface, EmptyDataDecls
+    if impl(ghc >= 7.1)
+        extensions: NondecreasingIndentation
     include-dirs: 	include
     includes:       HsUnix.h execvpe.h
     install-includes: