diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,7 @@
+### 0.21.3
+
++ Fix a compilation error on Windows, see [issue 193](https://github.com/haskell-gi/haskell-gi/issues/193).
+
 ### 0.21.2
 
 + Export [newManagedPtr_](https://hackage.haskell.org/package/haskell-gi-base-0.21.2/docs/Data-GI-Base-ManagedPtr.html#v:newManagedPtr_).
diff --git a/c/hsgclosure.c b/c/hsgclosure.c
--- a/c/hsgclosure.c
+++ b/c/hsgclosure.c
@@ -26,7 +26,14 @@
   A mutex protecting the log file handle. We make it recursive,
   i.e. refcounted, so it is OK to lock repeatedly in the same thread.
 */
-static pthread_mutex_t log_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+static pthread_mutex_t log_mutex =
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+  PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+  PTHREAD_RECURSIVE_MUTEX_INITIALIZER;
+#else
+  #error "Recursive mutex initializers not supported on this platform."
+#endif
 
 /* Give the current thread exclusive access to the log */
 static void lock_log()
diff --git a/haskell-gi-base.cabal b/haskell-gi-base.cabal
--- a/haskell-gi-base.cabal
+++ b/haskell-gi-base.cabal
@@ -1,5 +1,5 @@
 name:                haskell-gi-base
-version:             0.21.2
+version:             0.21.3
 synopsis:            Foundation for libraries generated by haskell-gi
 description:         Foundation for libraries generated by haskell-gi
 homepage:            https://github.com/haskell-gi/haskell-gi-base
