ladybird/Ports/cmake/patches/0008-unix-stuff.patch

77 lines
1.9 KiB
Diff
Raw Normal View History

From d8b3a1a970d92d5e66a7caa3805a56c186027f44 Mon Sep 17 00:00:00 2001
From: AnotherTest <ali.mpfard@gmail.com>
Date: Fri, 12 Feb 2021 03:12:38 +0330
Subject: [PATCH 08/11] unix stuff
---
Utilities/cmlibuv/src/unix/core.c | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/Utilities/cmlibuv/src/unix/core.c b/Utilities/cmlibuv/src/unix/core.c
index e6d61ee..f90d9a3 100644
--- a/Utilities/cmlibuv/src/unix/core.c
+++ b/Utilities/cmlibuv/src/unix/core.c
@@ -578,6 +578,14 @@ int uv__close(int fd) {
}
+#if defined(_AIX) || \
+ defined(__APPLE__) || \
+ defined(__DragonFly__) || \
+ defined(__FreeBSD__) || \
+ defined(__FreeBSD_kernel__) || \
+ defined(__linux__) || \
+ defined(__OpenBSD__) || \
+ defined(__NetBSD__)
int uv__nonblock_ioctl(int fd, int set) {
int r;
@@ -590,9 +598,18 @@ int uv__nonblock_ioctl(int fd, int set) {
return 0;
}
+#endif
-#if !defined(__hpux) && !defined(__CYGWIN__) && !defined(__MSYS__) && !defined(__HAIKU__)
+#if defined(_AIX) || \
+ defined(__APPLE__) || \
+ defined(__DragonFly__) || \
+ defined(__FreeBSD__) || \
+ defined(__FreeBSD_kernel__) || \
+ defined(__linux__) || \
+ defined(__OpenBSD__) || \
+ defined(__NetBSD__)
+
int uv__cloexec_ioctl(int fd, int set) {
int r;
@@ -1422,8 +1439,13 @@ int uv_os_getpriority(uv_pid_t pid, int* priority) {
if (priority == NULL)
return UV_EINVAL;
+ /*
errno = 0;
r = getpriority(PRIO_PROCESS, (int) pid);
+ */
+
+ errno = 0;
+ r = 1;
if (r == -1 && errno != 0)
return UV__ERR(errno);
@@ -1437,8 +1459,10 @@ int uv_os_setpriority(uv_pid_t pid, int priority) {
if (priority < UV_PRIORITY_HIGHEST || priority > UV_PRIORITY_LOW)
return UV_EINVAL;
+ /*
if (setpriority(PRIO_PROCESS, (int) pid, priority) != 0)
return UV__ERR(errno);
+ */
return 0;
}
--
2.30.1