fix: libuv patch redefines existing structs

Relibc defines those structs now. The build fails because the patch
redefines those structs.
This commit is contained in:
Josh Megnauth 2025-03-16 00:51:56 -04:00
parent e20cfd50dd
commit 4975df337f
No known key found for this signature in database
GPG Key ID: 70813183462EFAD3
2 changed files with 2 additions and 18 deletions

View File

@ -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 = """

View File

@ -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,