diff --git a/recipes/libs/libuv/redox.patch b/recipes/libs/libuv/redox.patch index c3f0bf27f..d5405adf2 100644 --- a/recipes/libs/libuv/redox.patch +++ b/recipes/libs/libuv/redox.patch @@ -1,12 +1,12 @@ diff -ruwN source/CMakeLists.txt source-new/CMakeLists.txt --- source/CMakeLists.txt 2023-05-19 18:21:01.000000000 +0700 -+++ source-new/CMakeLists.txt 2025-07-22 01:48:56.591286953 +0700 ++++ source-new/CMakeLists.txt 2025-09-16 14:15:31.813140608 +0700 @@ -1,3 +1,4 @@ +set (CMAKE_CXX_STANDARD 99) cmake_minimum_required(VERSION 3.4) if(POLICY CMP0091) -@@ -312,6 +313,17 @@ +@@ -312,6 +313,18 @@ src/unix/hurd.c) endif() @@ -18,6 +18,7 @@ diff -ruwN source/CMakeLists.txt source-new/CMakeLists.txt + src/unix/proctitle.c + src/unix/posix-hrtime.c + src/unix/posix-poll.c ++ src/unix/redox.c + ) +endif() + @@ -26,7 +27,7 @@ diff -ruwN source/CMakeLists.txt source-new/CMakeLists.txt list(APPEND uv_libraries dl rt) diff -ruwN source/include/uv/unix.h source-new/include/uv/unix.h --- source/include/uv/unix.h 2023-05-19 18:21:01.000000000 +0700 -+++ source-new/include/uv/unix.h 2025-07-22 01:53:54.941276543 +0700 ++++ source-new/include/uv/unix.h 2025-09-16 11:42:40.882554686 +0700 @@ -66,6 +66,7 @@ defined(__MSYS__) || \ defined(__HAIKU__) || \ @@ -37,7 +38,7 @@ diff -ruwN source/include/uv/unix.h source-new/include/uv/unix.h #endif diff -ruwN source/src/unix/core.c source-new/src/unix/core.c --- source/src/unix/core.c 2023-05-19 18:21:01.000000000 +0700 -+++ source-new/src/unix/core.c 2025-07-21 22:55:16.826444959 +0700 ++++ source-new/src/unix/core.c 2025-09-16 11:42:40.882554686 +0700 @@ -97,6 +97,10 @@ # include #endif @@ -61,7 +62,7 @@ diff -ruwN source/src/unix/core.c source-new/src/unix/core.c if (rc == -1) diff -ruwN source/src/unix/fs.c source-new/src/unix/fs.c --- source/src/unix/fs.c 2023-05-19 18:21:01.000000000 +0700 -+++ source-new/src/unix/fs.c 2025-07-21 22:55:16.826444959 +0700 ++++ source-new/src/unix/fs.c 2025-09-16 11:42:40.882554686 +0700 @@ -87,7 +87,8 @@ defined(__MVS__) || \ defined(__NetBSD__) || \ @@ -100,7 +101,7 @@ diff -ruwN source/src/unix/fs.c source-new/src/unix/fs.c stat_fs->f_type = buf.f_type; diff -ruwN source/src/unix/proctitle.c source-new/src/unix/proctitle.c --- source/src/unix/proctitle.c 2023-05-19 18:21:01.000000000 +0700 -+++ source-new/src/unix/proctitle.c 2025-07-22 02:10:12.760625178 +0700 ++++ source-new/src/unix/proctitle.c 2025-09-16 11:42:40.882554686 +0700 @@ -30,7 +30,13 @@ size_t cap; /* Maximum capacity. Computed once in uv_setup_args(). */ }; @@ -115,9 +116,115 @@ diff -ruwN source/src/unix/proctitle.c source-new/src/unix/proctitle.c static uv_mutex_t process_title_mutex; static uv_once_t process_title_mutex_once = UV_ONCE_INIT; +diff -ruwN source/src/unix/redox.c source-new/src/unix/redox.c +--- source/src/unix/redox.c 1970-01-01 07:00:00.000000000 +0700 ++++ source-new/src/unix/redox.c 2025-09-16 14:28:29.209614311 +0700 +@@ -0,0 +1,102 @@ ++/* Copyright libuv contributors. All rights reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a copy ++ * of this software and associated documentation files (the "Software"), to ++ * deal in the Software without restriction, including without limitation the ++ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS ++ * IN THE SOFTWARE. ++ */ ++ ++#include "uv.h" ++#include "internal.h" ++ ++#include ++#include ++#include ++ ++static void ++get_mem_info(uint64_t* totalmem, uint64_t* freemem) { ++ *totalmem = 0; ++ *freemem = 0; ++} ++ ++ ++void uv_loadavg(double avg[3]) { ++ avg[0] = 0.0; ++ avg[1] = 0.0; ++ avg[2] = 0.0; ++} ++ ++ ++int uv_exepath(char* buffer, size_t* size) { ++ if (buffer == NULL || size == NULL || *size == 0) { ++ return UV_EINVAL; ++ } ++ FILE* fp = fopen("/scheme/sys/exe", "r"); ++ if (fp == NULL) { ++ return -errno; ++ } ++ if (fgets(buffer, *size, fp) == NULL) { ++ fclose(fp); ++ return UV_EIO; ++ } ++ fclose(fp); ++ buffer[strcspn(buffer, "\r\n")] = '\0'; ++ *size = strlen(buffer); ++ return 0; ++} ++ ++int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { ++ return 0; ++} ++ ++ ++uint64_t uv_get_free_memory(void) { ++ return 0; ++} ++ ++ ++uint64_t uv_get_total_memory(void) { ++ return 0; ++} ++ ++ ++uint64_t uv_get_constrained_memory(void) { ++ return 0; ++} ++ ++ ++uint64_t uv_get_available_memory(void) { ++ return uv_get_free_memory(); ++} ++ ++ ++int uv_resident_set_memory(size_t* rss) { ++ return 0; ++} ++ ++ ++int uv_uptime(double* uptime) { ++ return 0; ++} ++ ++ ++int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { ++ return 0; ++} ++ ++void uv_free_interface_addresses(uv_interface_address_t* addresses, ++ int count) { ++} diff -ruwN source/src/unix/stream.c source-new/src/unix/stream.c --- source/src/unix/stream.c 2023-05-19 18:21:01.000000000 +0700 -+++ source-new/src/unix/stream.c 2025-07-21 22:55:16.826444959 +0700 ++++ source-new/src/unix/stream.c 2025-09-16 11:42:40.883554697 +0700 @@ -29,7 +29,14 @@ #include @@ -151,7 +258,7 @@ diff -ruwN source/src/unix/stream.c source-new/src/unix/stream.c struct cmsghdr hdr; diff -ruwN source/src/unix/udp.c source-new/src/unix/udp.c --- source/src/unix/udp.c 2023-05-19 18:21:01.000000000 +0700 -+++ source-new/src/unix/udp.c 2025-07-21 22:55:16.826444959 +0700 ++++ source-new/src/unix/udp.c 2025-09-16 11:42:40.883554697 +0700 @@ -31,6 +31,12 @@ #include #endif