summaryrefslogtreecommitdiff
path: root/contrib/pg_upgrade/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pg_upgrade/util.c')
-rw-r--r--contrib/pg_upgrade/util.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/contrib/pg_upgrade/util.c b/contrib/pg_upgrade/util.c
index 3b94057696d..84a02ecaf46 100644
--- a/contrib/pg_upgrade/util.c
+++ b/contrib/pg_upgrade/util.c
@@ -234,18 +234,15 @@ get_user_info(char **user_name_p)
/*
* getErrorText()
*
- * Returns the text of the error message for the given error number
- *
- * This feature is factored into a separate function because it is
- * system-dependent.
+ * Returns the text of the most recent error
*/
const char *
-getErrorText(int errNum)
+getErrorText(void)
{
#ifdef WIN32
_dosmaperr(GetLastError());
#endif
- return pg_strdup(strerror(errNum));
+ return pg_strdup(strerror(errno));
}