From 186cac5c25075381f7c4f1793983f09131406909 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Wed, 1 Oct 2014 12:37:29 +0100 Subject: [PATCH] Use the anet-reported error string when reporting bind errors. errno may have been modified by the time you see it. --- net_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net_io.c b/net_io.c index 2b0ed9a..4aa2a54 100644 --- a/net_io.c +++ b/net_io.c @@ -88,7 +88,7 @@ void modesInitNet(void) { int s = anetTcpServer(Modes.aneterr, services[j].port, NULL); if (s == -1) { fprintf(stderr, "Error opening the listening port %d (%s): %s\n", - services[j].port, services[j].descr, strerror(errno)); + services[j].port, services[j].descr, Modes.aneterr); exit(1); } anetNonBlock(Modes.aneterr, s);