Don't overwrite errno before generating message.

This commit is contained in:
Simon Kelley
2013-12-02 13:22:37 +00:00
parent 0d6eb134f5
commit 3dffbc3ebf

View File

@@ -630,7 +630,11 @@ static int make_sock(union mysockaddr *addr, int type, int dienow)
s = _("failed to create listening socket for %s: %s"); s = _("failed to create listening socket for %s: %s");
if (fd != -1) if (fd != -1)
close (fd); {
int errsav = errno;
close (fd);
errno = errsav;
}
if (dienow) if (dienow)
{ {