fix macOS build

This commit is contained in:
asrael 2026-01-31 11:22:47 -06:00
parent 359657e174
commit 0c0aa792c1
No known key found for this signature in database
GPG key ID: 2786557804DFAE24
5 changed files with 107 additions and 9 deletions

View file

@ -110,6 +110,9 @@ pxl8_result pxl8_net_connect(pxl8_net* net) {
#endif
memset(&net->server_addr, 0, sizeof(net->server_addr));
#ifdef __APPLE__
net->server_addr.sin_len = sizeof(net->server_addr);
#endif
net->server_addr.sin_family = AF_INET;
net->server_addr.sin_port = htons(net->port);
inet_pton(AF_INET, net->address, &net->server_addr.sin_addr);