patch 7.4.2080
Problem:    When using PERROR() on some systems assert_fails() does not see
            the error.
Solution:   Make PERROR() always report the error.
diff --git a/src/message.c b/src/message.c
index 7aec2d6..c49429d 100644
--- a/src/message.c
+++ b/src/message.c
@@ -521,6 +521,21 @@
     return FALSE;
 }
 
+#if !defined(HAVE_STRERROR) || defined(PROTO)
+/*
+ * Replacement for perror() that behaves more or less like emsg() was called.
+ * v:errmsg will be set and called_emsg will be set.
+ */
+    void
+do_perror(char *msg)
+{
+    perror(msg);
+    ++emsg_silent;
+    emsg((char_u *)msg);
+    --emsg_silent;
+}
+#endif
+
 /*
  * emsg() - display an error message
  *