Fix recipes importing strings.h

This commit is contained in:
Wildan M 2026-05-02 08:20:38 +07:00
parent 5dca55d74b
commit 7f8859812f
No known key found for this signature in database
GPG Key ID: 01AC53185C679C79
6 changed files with 63 additions and 12 deletions

View File

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

View File

@ -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 <string.h>
#ifdef HAVE_STRINGS_H

View File

@ -1,8 +0,0 @@
#TODO Promote
[source]
tar = "https://libzip.org/download/libzip-1.10.1.tar.gz"
[build]
template = "cmake"
dependencies = [
"zlib",
]

View File

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

View File

@ -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 <stdint.h>
#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+
size_t ares_strnlen(const char *str, size_t maxlen) {
const char *p = NULL;
if (str == NULL) {

View File

@ -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 <string.h>
-# 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 <strings.h>
# 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 <string.h>
-# 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 <strings.h>
# 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 )