diff --git a/System/Posix/Unistd.hsc b/System/Posix/Unistd.hsc
index 3b8d2e43d6e6ea589388d6e3d1f33ca0c0694e28..3f2d115df4957f208e1a3959451e623bfb430a95 100644
--- a/System/Posix/Unistd.hsc
+++ b/System/Posix/Unistd.hsc
@@ -239,7 +239,7 @@ foreign import capi safe "unistd.h fsync"
   c_fsync :: Fd -> IO CInt
 #else
 {-# WARNING fileSynchronise
-    "operation will throw exception (CPP guard: @#if HAVE_FSYNC@)" #-}
+    "operation will throw 'IOError' \"unsupported operation\" (CPP guard: @#if HAVE_FSYNC@)" #-}
 fileSynchronise _ = ioError (ioeSetLocation unsupportedOperation
                              "fileSynchronise")
 #endif
@@ -260,7 +260,7 @@ foreign import capi safe "unistd.h fdatasync"
   c_fdatasync :: Fd -> IO CInt
 #else
 {-# WARNING fileSynchroniseDataOnly
-    "operation will throw exception (CPP guard: @#if HAVE_FDATASYNC@)" #-}
+    "operation will throw 'IOError' \"unsupported operation\" (CPP guard: @#if HAVE_FDATASYNC@)" #-}
 fileSynchroniseDataOnly _ = ioError (ioeSetLocation unsupportedOperation
                                      "fileSynchroniseDataOnly")
 #endif