Add headers for gcc

This commit is contained in:
Angelos Katharopoulos
2025-11-20 17:24:22 -08:00
parent df6b23156f
commit 704f81c03d
3 changed files with 6 additions and 1 deletions

View File

@@ -1079,6 +1079,8 @@ class IBVGroup : public GroupImpl {
bool is_available() {
if (__builtin_available(macOS 26.2, *)) {
return true;
} else {
return false;
}
}

View File

@@ -2,6 +2,7 @@
#include <netdb.h>
#include <unistd.h>
#include <cstring>
#include <sstream>
#include <thread>
@@ -14,7 +15,7 @@ namespace mlx::core::distributed::detail {
*/
address_t parse_address(const std::string& ip, const std::string& port) {
struct addrinfo hints, *res;
memset(&hints, 0, sizeof(hints));
std::memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;

View File

@@ -3,6 +3,8 @@
#pragma once
#include <sys/socket.h>
#include <functional>
#include <string>
namespace mlx::core::distributed::detail {