1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:24:57 +00:00

LibC: The port numbers returned by getservby*() should be in network byte order

This commit is contained in:
Gunnar Beutner 2021-04-12 16:44:40 +02:00 committed by Andreas Kling
parent 287a93a2a4
commit 8fcf91b030

View file

@ -342,7 +342,7 @@ struct servent* getservent()
return nullptr;
__getserv_buffer.s_name = const_cast<char*>(__getserv_name_buffer.characters());
__getserv_buffer.s_port = __getserv_port_buffer;
__getserv_buffer.s_port = htons(__getserv_port_buffer);
__getserv_buffer.s_proto = const_cast<char*>(__getserv_protocol_buffer.characters());
__getserv_alias_list.clear_with_capacity();