diff options
Diffstat (limited to 'contrib/pg_upgrade/util.c')
-rw-r--r-- | contrib/pg_upgrade/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/pg_upgrade/util.c b/contrib/pg_upgrade/util.c index 27dcd22a9b3..c32cfcae645 100644 --- a/contrib/pg_upgrade/util.c +++ b/contrib/pg_upgrade/util.c @@ -229,6 +229,8 @@ getErrorText(int errNum) { #ifdef WIN32 _dosmaperr(GetLastError()); + /* _dosmaperr sets errno, so we copy errno here */ + errNum = errno; #endif return strdup(strerror(errNum)); } |