diff --git a/src/pcm-sensor-server.cpp b/src/pcm-sensor-server.cpp index f8c3c3b4..45f9c30b 100644 --- a/src/pcm-sensor-server.cpp +++ b/src/pcm-sensor-server.cpp @@ -1301,10 +1301,10 @@ class Server { SignalHandler* shi = SignalHandler::getInstance(); shi->setSocket( serverSocket_ ); shi->ignoreSignal( SIGPIPE ); // Sorry Dennis Ritchie, we do not care about this, we always check return codes - #ifndef UNIT_TEST // libFuzzer installs own signal handlers +#ifndef UNIT_TEST // libFuzzer installs own signal handlers shi->installHandler( SignalHandler::handleSignal, SIGTERM ); shi->installHandler( SignalHandler::handleSignal, SIGINT ); - #endif +#endif } Server( Server const & ) = delete; Server & operator = ( Server const & ) = delete; @@ -1320,26 +1320,26 @@ class Server { if ( port_ == 0 ) throw std::runtime_error( "Server Constructor: No port specified." ); - int sockfd = ::socket( AF_INET, SOCK_STREAM, 0 ); + int sockfd = ::socket( AF_INET6, SOCK_STREAM, 0 ); if ( -1 == sockfd ) throw std::runtime_error( "Server Constructor: CanĀ“t create socket" ); int retval = 0; - struct sockaddr_in serv; - serv.sin_family = AF_INET; - serv.sin_port = htons( port_ ); + struct sockaddr_in6 serv; + serv.sin6_family = AF_INET6; + serv.sin6_port = htons( port_ ); if ( listenIP_.empty() ) - serv.sin_addr.s_addr = INADDR_ANY; + serv.sin6_addr = in6addr_any; else { - if ( 1 != ::inet_pton( AF_INET, listenIP_.c_str(), &(serv.sin_addr) ) ) + if ( 1 != ::inet_pton( AF_INET6, listenIP_.c_str(), &(serv.sin6_addr) ) ) { DBG( 3, "close clientsocketFD" ); ::close(sockfd); throw std::runtime_error( "Server Constructor: Cannot convert IP string" ); } } - socklen_t len = sizeof( struct sockaddr_in ); + socklen_t len = sizeof( struct sockaddr_in6 ); retval = ::bind( sockfd, reinterpret_cast(&serv), len ); if ( 0 != retval ) { DBG( 3, "close clientsocketFD" ); diff --git a/src/simdjson b/src/simdjson index b4242d3b..d4bf0cc7 160000 --- a/src/simdjson +++ b/src/simdjson @@ -1 +1 @@ -Subproject commit b4242d3b4ffb97854b035175be077aab712a2d46 +Subproject commit d4bf0cc7ec12c30c68cb7ed443895df546390283