From 7f8859812f8aafbcb55365678fd7cf16c498ba99 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Sat, 2 May 2026 08:20:38 +0700 Subject: [PATCH 1/2] Fix recipes importing strings.h --- recipes/archives/libzip/recipe.toml | 9 ++++++ recipes/archives/libzip/redox.patch | 11 +++++++ recipes/wip/libs/archives/libzip/recipe.toml | 8 ------ recipes/wip/libs/net/c-ares/recipe.toml | 3 +- recipes/wip/libs/net/c-ares/redox.patch | 14 +++++++++ recipes/wip/x11/x11proto/redox.patch | 30 ++++++++++++++++++-- 6 files changed, 63 insertions(+), 12 deletions(-) create mode 100644 recipes/archives/libzip/recipe.toml create mode 100644 recipes/archives/libzip/redox.patch delete mode 100644 recipes/wip/libs/archives/libzip/recipe.toml create mode 100644 recipes/wip/libs/net/c-ares/redox.patch diff --git a/recipes/archives/libzip/recipe.toml b/recipes/archives/libzip/recipe.toml new file mode 100644 index 00000000..bb9ee590 --- /dev/null +++ b/recipes/archives/libzip/recipe.toml @@ -0,0 +1,9 @@ +[source] +tar = "https://libzip.org/download/libzip-1.11.4.tar.gz" +blake3 = "844cf66c68f2dcf182f6626d5b72d55b75a100c0a93b3e6a45b447669ecf7088" +patches = ["redox.patch"] +[build] +template = "cmake" +dependencies = [ + "zlib", +] diff --git a/recipes/archives/libzip/redox.patch b/recipes/archives/libzip/redox.patch new file mode 100644 index 00000000..2159ef4c --- /dev/null +++ b/recipes/archives/libzip/redox.patch @@ -0,0 +1,11 @@ +diff -ruwN source/lib/zip_name_locate.c source-new/lib/zip_name_locate.c +--- source/lib/zip_name_locate.c 2025-05-23 20:55:07.000000000 +0700 ++++ source-new/lib/zip_name_locate.c 2026-05-02 07:04:59.532882922 +0700 +@@ -31,6 +31,7 @@ + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#include "config.h" + + #include + #ifdef HAVE_STRINGS_H diff --git a/recipes/wip/libs/archives/libzip/recipe.toml b/recipes/wip/libs/archives/libzip/recipe.toml deleted file mode 100644 index 4e7ec064..00000000 --- a/recipes/wip/libs/archives/libzip/recipe.toml +++ /dev/null @@ -1,8 +0,0 @@ -#TODO Promote -[source] -tar = "https://libzip.org/download/libzip-1.10.1.tar.gz" -[build] -template = "cmake" -dependencies = [ - "zlib", -] diff --git a/recipes/wip/libs/net/c-ares/recipe.toml b/recipes/wip/libs/net/c-ares/recipe.toml index fb70df00..d95728af 100644 --- a/recipes/wip/libs/net/c-ares/recipe.toml +++ b/recipes/wip/libs/net/c-ares/recipe.toml @@ -1,5 +1,6 @@ -#TODO: test again [source] tar = "https://github.com/c-ares/c-ares/releases/download/v1.34.6/c-ares-1.34.6.tar.gz" +blake3 = "053dfcbc7754502c2df605d0989f978793cf714014b18dbbef030bef405b1cc1" +patches = ["redox.patch"] [build] template = "cmake" diff --git a/recipes/wip/libs/net/c-ares/redox.patch b/recipes/wip/libs/net/c-ares/redox.patch new file mode 100644 index 00000000..827b136e --- /dev/null +++ b/recipes/wip/libs/net/c-ares/redox.patch @@ -0,0 +1,14 @@ +diff -ruwN source/src/lib/str/ares_str.c source-new/src/lib/str/ares_str.c +--- source/src/lib/str/ares_str.c 2025-12-08 23:21:36.000000000 +0700 ++++ source-new/src/lib/str/ares_str.c 2026-05-02 07:21:36.079534879 +0700 +@@ -32,6 +32,10 @@ + # include + #endif + ++#ifdef HAVE_STRINGS_H ++# include ++#endif ++ + size_t ares_strnlen(const char *str, size_t maxlen) { + const char *p = NULL; + if (str == NULL) { diff --git a/recipes/wip/x11/x11proto/redox.patch b/recipes/wip/x11/x11proto/redox.patch index 55a31930..e06180ff 100644 --- a/recipes/wip/x11/x11proto/redox.patch +++ b/recipes/wip/x11/x11proto/redox.patch @@ -1,6 +1,30 @@ -diff -ruwN xorgproto-2023.2/include/X11/Xos_r.h source/include/X11/Xos_r.h ---- xorgproto-2023.2/include/X11/Xos_r.h 2023-06-16 01:32:38.000000000 -0600 -+++ source/include/X11/Xos_r.h 2025-05-02 10:10:07.250524701 -0600 +diff -ruwN source/include/X11/Xfuncs.h source-new/include/X11/Xfuncs.h +--- source/include/X11/Xfuncs.h 2024-03-26 14:16:32.000000000 +0700 ++++ source-new/include/X11/Xfuncs.h 2026-05-02 08:17:20.538178973 +0700 +@@ -44,7 +44,7 @@ + # define bcmp(b1,b2,len) memcmp(b1, b2, len) + # else + # include +-# if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__) ++# if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__) || defined(__redox__) + # include + # endif + # define _XFUNCS_H_INCLUDED_STRING_H +diff -ruwN source/include/X11/Xos.h source-new/include/X11/Xos.h +--- source/include/X11/Xos.h 2024-03-26 14:16:32.000000000 +0700 ++++ source-new/include/X11/Xos.h 2026-05-02 08:18:39.611339183 +0700 +@@ -60,7 +60,7 @@ + */ + + # include +-# if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__) ++# if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__redox__) + # include + # else + # ifndef index +diff -ruwN source/include/X11/Xos_r.h source-new/include/X11/Xos_r.h +--- source/include/X11/Xos_r.h 2024-03-26 14:16:32.000000000 +0700 ++++ source-new/include/X11/Xos_r.h 2026-05-02 08:17:20.538337051 +0700 @@ -318,7 +318,7 @@ (_Xos_processUnlock), \ (p).pwp ) From e96734e9101de4819a31342020ef7db9a756b005 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Sat, 2 May 2026 08:23:00 +0700 Subject: [PATCH 2/2] Remove rsync openat patches --- recipes/net/rsync/recipe.toml | 2 +- recipes/net/rsync/redox.patch | 25 ------------------------- 2 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 recipes/net/rsync/redox.patch diff --git a/recipes/net/rsync/recipe.toml b/recipes/net/rsync/recipe.toml index 97f143fa..32c1d89c 100644 --- a/recipes/net/rsync/recipe.toml +++ b/recipes/net/rsync/recipe.toml @@ -1,6 +1,6 @@ [source] tar = "https://download.samba.org/pub/rsync/src/rsync-3.4.1.tar.gz" -patches = ["redox.patch"] +blake3 = "e1cfdd51a1a89a49e73f8fa730a4321392fe4a29533c0979c2c09c7ce3808b6f" [build] template = "configure" diff --git a/recipes/net/rsync/redox.patch b/recipes/net/rsync/redox.patch deleted file mode 100644 index 07a929b0..00000000 --- a/recipes/net/rsync/redox.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -ruwN source/rsync.h source-new/rsync.h ---- source/rsync.h 2025-01-16 02:21:54.000000000 +0700 -+++ source-new/rsync.h 2025-09-08 12:18:06.427647717 +0700 -@@ -483,6 +483,21 @@ - #include - #endif - -+#ifdef __redox__ -+ -+// no sys/sysmacros.h, probably no problem -+#include -+#define major(dev) (0) -+#define minor(dev) (0) -+#define makedev(maj, min) (0) -+ -+// no openat yet -+#undef O_NOFOLLOW -+#undef O_DIRECTORY -+#undef AT_FDCWD -+ -+#endif -+ - #ifdef MAKEDEV_TAKES_3_ARGS - #define MAKEDEV(devmajor,devminor) makedev(0,devmajor,devminor) - #else