mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
Fix Solaris build problem (jonas pointed out strerror_r is not available).
ndb/src/common/util/SocketServer.cpp: strerror_r is not available on all platforms. Use plain strerror.
This commit is contained in:
parent
d4b0127d72
commit
2504a794f2
1 changed files with 1 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue