diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,7 @@
+#### 0.2.0.1 *2024-12-16*
+
+	* Fix build with pre 5.6 linux-headers, where there is no support for time namespaces.
+
 #### 0.2.0.0 *2024-11-29*
 
 	* Add support for CGroup and time namespaces.
diff --git a/System/Linux/Namespaces.hsc b/System/Linux/Namespaces.hsc
--- a/System/Linux/Namespaces.hsc
+++ b/System/Linux/Namespaces.hsc
@@ -74,7 +74,15 @@
 --------------------------------------------------------------------------------
 
 -- | Types of namespaces.
-data Namespace = IPC | Network | Mount | PID | User | UTS | CGroup | Time
+data Namespace
+    = IPC
+    | Network
+    | Mount
+    | PID
+    | User
+    | UTS
+    | CGroup
+    | Time
   deriving (Show, Read, Eq, Bounded, Enum)
 
 toCloneFlags :: Namespace -> CInt
@@ -87,7 +95,11 @@
         User    -> (#const CLONE_NEWUSER)
         UTS     -> (#const CLONE_NEWUTS)
         CGroup  -> (#const CLONE_NEWCGROUP)
+#ifdef CLONE_NEWTIME
         Time    -> (#const CLONE_NEWTIME)
+#else
+        Time    -> error "CLONE_NEWTIME is not defined"
+#endif
 
 toProcName :: Namespace -> String
 toProcName ns =
diff --git a/linux-namespaces.cabal b/linux-namespaces.cabal
--- a/linux-namespaces.cabal
+++ b/linux-namespaces.cabal
@@ -1,5 +1,5 @@
 name:                linux-namespaces
-version:             0.2.0.0
+version:             0.2.0.1
 synopsis:            Work with linux namespaces: create new or enter existing ones
 description:
   This library provides bindings to the @unshare(2)@ and @setns(2)@ linux
