From 67b30cf984c7e63dcf675a01b3af0b42fac1e2dc Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sun, 8 Sep 2019 12:42:17 +0200 Subject: disable setpriority/getpriority for R1B1. diff --git a/src/unix/core.c b/src/unix/core.c index 1597828..bb8663c 100644 --- a/src/unix/core.c +++ b/src/unix/core.c @@ -1410,6 +1410,9 @@ int uv_os_getpriority(uv_pid_t pid, int* priority) { if (priority == NULL) return UV_EINVAL; +#ifdef __HAIKU__ + return UV__ERR(ENOSYS); +#else errno = 0; r = getpriority(PRIO_PROCESS, (int) pid); @@ -1418,6 +1421,7 @@ int uv_os_getpriority(uv_pid_t pid, int* priority) { *priority = r; return 0; +#endif } @@ -1425,8 +1429,10 @@ int uv_os_setpriority(uv_pid_t pid, int priority) { if (priority < UV_PRIORITY_HIGHEST || priority > UV_PRIORITY_LOW) return UV_EINVAL; +#ifndef __HAIKU__ if (setpriority(PRIO_PROCESS, (int) pid, priority) != 0) return UV__ERR(errno); +#endif return 0; } -- 2.28.0 From cbd75c20df89b117c89db0b507ab25cdc4741068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Thu, 29 Oct 2020 07:40:26 +0100 Subject: Test will not run as root diff --git a/test/run-tests.c b/test/run-tests.c index e5e75e1..554a539 100644 --- a/test/run-tests.c +++ b/test/run-tests.c @@ -52,7 +52,7 @@ static int maybe_run_test(int argc, char **argv); int main(int argc, char **argv) { -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(__HAIKU__) if (0 == geteuid() && NULL == getenv("UV_RUN_AS_ROOT")) { fprintf(stderr, "The libuv test suite cannot be run as root.\n"); return EXIT_FAILURE; -- 2.28.0