From 4975df337f12b75e45e2ea722c153afcb831135b Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Sun, 16 Mar 2025 00:51:56 -0400 Subject: [PATCH] fix: libuv patch redefines existing structs Relibc defines those structs now. The build fails because the patch redefines those structs. --- recipes/libs/libuv/recipe.toml | 2 ++ recipes/libs/libuv/redox.patch | 18 ------------------ 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/recipes/libs/libuv/recipe.toml b/recipes/libs/libuv/recipe.toml index c8845341..1a45a3d1 100644 --- a/recipes/libs/libuv/recipe.toml +++ b/recipes/libs/libuv/recipe.toml @@ -1,6 +1,8 @@ [source] tar = "https://dist.libuv.org/dist/v1.45.0/libuv-v1.45.0.tar.gz" +blake3 = "b78eaba37bfa5fea75accc6d70c67358a4d0b6bb2dfb79b9bb17cb5478cdf797" patches = ["redox.patch"] + [build] template = "custom" script = """ diff --git a/recipes/libs/libuv/redox.patch b/recipes/libs/libuv/redox.patch index eea85fc2..bc1a1609 100644 --- a/recipes/libs/libuv/redox.patch +++ b/recipes/libs/libuv/redox.patch @@ -119,21 +119,3 @@ diff -ruwN a/src/unix/udp.c b/src/unix/udp.c #if defined(IPV6_JOIN_GROUP) && !defined(IPV6_ADD_MEMBERSHIP) # define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP -@@ -937,7 +943,16 @@ - return 0; - } - -- -+#if defined(__redox__) -+// Define the types -+typedef uint64_t ULONG; // equivalent to Rust's u64 -+ -+typedef struct group_source_req { -+ ULONG gsr_interface; -+ struct sockaddr_storage gsr_group; // Use the struct keyword here -+ struct sockaddr_storage gsr_source; // Use the struct keyword here -+} GROUP_SOURCE_REQ, *PGROUP_SOURCE_REQ; -+#endif - static int uv__udp_set_source_membership6(uv_udp_t* handle, - const struct sockaddr_in6* multicast_addr, - const char* interface_addr,