Skip to content
Snippets Groups Projects
Commit e327bb58 authored by Constantin Papizh's avatar Constantin Papizh
Browse files

Crosspt fix

parent 1ea0c16b
No related branches found
No related tags found
1 merge request!77Conserver socket fix
......@@ -937,10 +937,14 @@ int dap_chain_node_cli_init(dap_config_t * g_config)
log_it( L_INFO, "Console interace on addr %s port %u ", l_listen_addr_str, l_listen_port );
server_addr.sin_family = AF_INET;
IN_ADDR _in_addr = { { .S_addr = htonl(INADDR_LOOPBACK) } };
#ifdef _WIN32
struct in_addr _in_addr = { { .S_addr = htonl(INADDR_LOOPBACK) } };
server_addr.sin_addr = _in_addr;
server_addr.sin_port = l_listen_port;
#else
inet_pton( AF_INET, l_listen_addr_str, &server_addr.sin_addr );
server_addr.sin_port = htons( (uint16_t)l_listen_port );
#endif
// create socket
if ( (sockfd = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET ) {
#ifdef __WIN32
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment