From 822d3e1da2f1a8ae2e8957d7cb5bc18ce3e7c7da Mon Sep 17 00:00:00 2001 From: henri Date: Sat, 10 Aug 2013 20:19:09 +0000 Subject: [PATCH] Fixed non-portable perror() statement. Replaced perror() by printf + socket_strerror(socket_errno()). Reported by Gisle Vanem. --- nsock/src/nsock_connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nsock/src/nsock_connect.c b/nsock/src/nsock_connect.c index aefc77cc4..ec598d3c5 100644 --- a/nsock/src/nsock_connect.c +++ b/nsock/src/nsock_connect.c @@ -146,7 +146,7 @@ static int nsock_make_socket(mspool *ms, msiod *iod, int family, int type, int p /* inheritable_socket is from nbase */ iod->sd = (int)inheritable_socket(family, type, proto); if (iod->sd == -1) { - perror("Socket troubles"); + nsock_log_error(ms, "Socket trouble: %s", socket_strerror(socket_errno())); return -1; }