Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix libuv for <10.7 #401

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/libuv-1.38.1/src/unix/darwin-proctitle.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ static int uv__pthread_setname_np(const char* name) {
strncpy(namebuf, name, sizeof(namebuf) - 1);
namebuf[sizeof(namebuf) - 1] = '\0';

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)
err = pthread_setname_np(namebuf);
if (err)
return UV__ERR(err);
#endif

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/libuv-1.38.1/src/unix/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ static ssize_t uv__fs_lutime(uv_fs_t* req) {
ts[0] = uv__fs_to_timespec(req->atime);
ts[1] = uv__fs_to_timespec(req->mtime);
return utimensat(AT_FDCWD, req->path, ts, AT_SYMLINK_NOFOLLOW);
#elif defined(__APPLE__) || \
#elif (defined(__APPLE__) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1050)) || \
defined(__DragonFly__) || \
defined(__FreeBSD__) || \
defined(__FreeBSD_kernel__) || \
Expand Down Expand Up @@ -1272,7 +1272,7 @@ static void uv__to_stat(struct stat* src, uv_stat_t* dst) {
dst->st_blksize = src->st_blksize;
dst->st_blocks = src->st_blocks;

#if defined(__APPLE__)
#if defined(__APPLE__) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1050)
dst->st_atim.tv_sec = src->st_atimespec.tv_sec;
dst->st_atim.tv_nsec = src->st_atimespec.tv_nsec;
dst->st_mtim.tv_sec = src->st_mtimespec.tv_sec;
Expand Down
2 changes: 1 addition & 1 deletion src/libuv-1.38.1/src/unix/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static int uv__tty_is_slave(const int fd) {
int dummy;

result = ioctl(fd, TIOCGPTN, &dummy) != 0;
#elif defined(__APPLE__)
#elif defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
char dummy[256];

result = ioctl(fd, TIOCPTYGNAME, &dummy) != 0;
Expand Down
6 changes: 4 additions & 2 deletions src/libuv-1.38.1/src/unix/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,8 @@ static int uv__udp_set_membership6(uv_udp_t* handle,
}


#if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__ANDROID__)
#if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__ANDROID__) && \
(!defined(__APPLE__) || (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070))
static int uv__udp_set_source_membership4(uv_udp_t* handle,
const struct sockaddr_in* multicast_addr,
const char* interface_addr,
Expand Down Expand Up @@ -1033,7 +1034,8 @@ int uv_udp_set_source_membership(uv_udp_t* handle,
const char* interface_addr,
const char* source_addr,
uv_membership membership) {
#if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__ANDROID__)
#if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__ANDROID__) && \
(!defined(__APPLE__) || (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070))
int err;
union uv__sockaddr mcast_addr;
union uv__sockaddr src_addr;
Expand Down