diff --git a/ndb/src/common/util/SocketServer.cpp b/ndb/src/common/util/SocketServer.cpp index a9251f8df4c..6019d24d736 100644 --- a/ndb/src/common/util/SocketServer.cpp +++ b/ndb/src/common/util/SocketServer.cpp @@ -123,11 +123,8 @@ SocketServer::setup(SocketServer::Service * service, /* Get the port we bound to */ SOCKET_SIZE_TYPE sock_len = sizeof(servaddr); if(getsockname(sock,(struct sockaddr*)&servaddr,&sock_len)<0) { - char msg[100]; - if(!strerror_r(errno,msg,sizeof(msg))) - strcpy(msg,"Unknown"); ndbout_c("An error occurred while trying to find out what" - " port we bound to. Error: %s",msg); + " port we bound to. Error: %s",strerror(errno)); NDB_CLOSE_SOCKET(sock); DBUG_RETURN(false); }