Merge branch 'fix-zstd' into 'master'

Fix and promote zstd

See merge request redox-os/cookbook!555
This commit is contained in:
Jeremy Soller 2025-07-21 13:47:38 -06:00
commit 435097cb46
3 changed files with 27 additions and 15 deletions

View File

@ -0,0 +1,15 @@
diff -ruwN source/programs/platform.h source-new/programs/platform.h
--- source/programs/platform.h 2025-02-19 07:04:24.000000000 +0700
+++ source-new/programs/platform.h 2025-07-21 22:52:07.716447723 +0700
@@ -109,6 +109,11 @@
#endif /* PLATFORM_POSIX_VERSION */
+#if defined(__redox__)
+/* TODO: AT_FDCWD && utimensat must be defined to conform _POSIX_VERSION */
+# define PLATFORM_POSIX_VERSION 1
+#endif
+
#if PLATFORM_POSIX_VERSION > 1
/* glibc < 2.26 may not expose struct timespec def without this.
* See issue #1920. */

View File

@ -0,0 +1,12 @@
[source]
tar = "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
patches = [
"01_redox.patch"
]
[build]
template = "custom"
script = """
DYNAMIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
${COOKBOOK_MAKE}
"""

View File

@ -1,15 +0,0 @@
#TODO waiting for openat implementation, building without openat fails
#NOTE although project supports building without openat, but the corresponding #if check
# checks for the presence of st_mtime, and if it exists it falsely assumes that AT_FDCWD is supported too
# for more info see starting from programs/util.c line 262: #if (PLATFORM_POSIX_VERSION >= 200809L) && defined(st_mtime)
[source]
tar = "https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz"
[build]
template = "custom"
script = """
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
${COOKBOOK_MAKE}
"""