diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,7 @@
+## 0.8.18.6
+
+* s/fdopen/_fdopen on Windows [#96](https://github.com/snoyberg/yaml/issues/96)
+
 ## 0.8.18.5
 
 * Properly fix previous bug (fixes #94)
diff --git a/Text/Libyaml.hs b/Text/Libyaml.hs
--- a/Text/Libyaml.hs
+++ b/Text/Libyaml.hs
@@ -149,7 +149,11 @@
 data FileStruct
 type File = Ptr FileStruct
 
+#ifdef WINDOWS
+foreign import ccall unsafe "_fdopen"
+#else
 foreign import ccall unsafe "fdopen"
+#endif
     c_fdopen :: CInt
              -> Ptr CChar
              -> IO File
diff --git a/yaml.cabal b/yaml.cabal
--- a/yaml.cabal
+++ b/yaml.cabal
@@ -1,5 +1,5 @@
 name:            yaml
-version:         0.8.18.5
+version:         0.8.18.6
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov
@@ -86,6 +86,8 @@
                              libyaml/scanner.c,
                              libyaml/writer.c
             include-dirs:    libyaml
+    if os(windows)
+            cpp-options:     -DWINDOWS
 
 executable yaml2json
     if flag(no-exe)
