Merge branch 'strings-attached' into 'master'

Fix recipes importing strings.h

See merge request redox-os/redox!2101
This commit is contained in:
Jeremy Soller 2026-05-02 06:20:42 -06:00
commit 6e840ef0ad
8 changed files with 64 additions and 38 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,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"

View File

@ -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 <sys/sysmacros.h>
#endif
+#ifdef __redox__
+
+// no sys/sysmacros.h, probably no problem
+#include <sys/types.h>
+#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

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 )