diff --git a/implementation/endpoints/src/tcp_client_endpoint_impl.cpp b/implementation/endpoints/src/tcp_client_endpoint_impl.cpp index 55cb2f42b..e67551573 100644 --- a/implementation/endpoints/src/tcp_client_endpoint_impl.cpp +++ b/implementation/endpoints/src/tcp_client_endpoint_impl.cpp @@ -178,7 +178,7 @@ void tcp_client_endpoint_impl::connect() { std::string its_device(configuration_->get_device()); if (its_device != "") { if (setsockopt(socket_->native_handle(), - SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), socklen_t{its_device.size()}) == -1) { + SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), static_cast(its_device.size())) == -1) { VSOMEIP_WARNING << "TCP Client: Could not bind to device \"" << its_device << "\""; } } diff --git a/implementation/endpoints/src/udp_server_endpoint_impl.cpp b/implementation/endpoints/src/udp_server_endpoint_impl.cpp index 314ab9555..587fb94c2 100644 --- a/implementation/endpoints/src/udp_server_endpoint_impl.cpp +++ b/implementation/endpoints/src/udp_server_endpoint_impl.cpp @@ -72,7 +72,7 @@ udp_server_endpoint_impl::udp_server_endpoint_impl( std::string its_device(configuration_->get_device()); if (its_device != "") { if (setsockopt(unicast_socket_.native_handle(), - SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), socklen_t{its_device.size()}) == -1) { + SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), static_cast(its_device.size())) == -1) { VSOMEIP_WARNING << "UDP Server: Could not bind to device \"" << its_device << "\""; } }