diff --git a/cbits/HsUnixCompat.c b/cbits/HsUnixCompat.c
--- a/cbits/HsUnixCompat.c
+++ b/cbits/HsUnixCompat.c
@@ -2,6 +2,8 @@
 
 #ifdef SOLARIS
 #include <sys/mkdev.h>
+#elif defined(__GLIBC__)
+#include <sys/sysmacros.h>
 #endif
 
 unsigned int unix_major(dev_t dev)
diff --git a/unix-compat.cabal b/unix-compat.cabal
--- a/unix-compat.cabal
+++ b/unix-compat.cabal
@@ -1,5 +1,5 @@
 name:           unix-compat
-version:        0.5.0.1
+version:        0.5.1
 synopsis:       Portable POSIX-compatibility layer.
 description:    This package provides portable implementations of parts
                 of the unix package. This package re-exports the unix
@@ -63,7 +63,7 @@
       System.PosixCompat.Internal.Time
 
   else
-    build-depends: unix >= 2.4 && < 2.8
+    build-depends: unix >= 2.4 && < 2.9
     include-dirs: include
     includes: HsUnixCompat.h
     install-includes: HsUnixCompat.h
