diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
 
 `hslua-cli` uses [PVP Versioning](https://pvp.haskell.org).
 
+## hslua-cli-1.4.0.1
+
+Released 2023-03-17.
+
+-   Fix building on Windows.
+
 ## hslua-cli-1.4.0
 
 Released 2023-03-16.
diff --git a/hslua-cli.cabal b/hslua-cli.cabal
--- a/hslua-cli.cabal
+++ b/hslua-cli.cabal
@@ -1,6 +1,6 @@
 cabal-version:       2.2
 name:                hslua-cli
-version:             1.4.0
+version:             1.4.0.1
 synopsis:            Command-line interface for Lua
 description:         Provides an embeddable command-line interface for Lua.
                      The interface is compatible with the standard Lua
@@ -65,6 +65,8 @@
                      , text              >= 1.2    && < 2.1
   if !os(windows)
     build-depends:     unix              >= 2.7    && < 2.9
+  if os(windows)
+    cpp-options:         -D_WINDOWS
 
 executable hslua
   import:              common-options
