Fix clang compilation for bzip2, flycast, termcap, x11proto

This commit is contained in:
Wildan M 2026-09-20 06:15:30 +07:00
parent cb6efb2a7c
commit 0ad73da5cb
No known key found for this signature in database
GPG Key ID: 01AC53185C679C79
5 changed files with 33 additions and 1 deletions

View File

@ -17,6 +17,7 @@ rsync -av --delete "${COOKBOOK_SOURCE}/" ./
PREFIX="${COOKBOOK_STAGE}/usr" \
install
if [ "${COOKBOOK_DYNAMIC}" = "1" ]; then
# However, distros distribute libbz2 as well so we'll support it too
# Linking the lib fails if we don't rebuild the objects from earlier
"${COOKBOOK_MAKE}" clean
@ -32,6 +33,7 @@ rsync -av --delete "${COOKBOOK_SOURCE}/" ./
cp -av libbz2.so* "${COOKBOOK_STAGE}/usr/lib"
ln -s "libbz2.so.1.0" "${COOKBOOK_STAGE}/usr/lib/libbz2.so.1"
ln -s "libbz2.so.1.0" "${COOKBOOK_STAGE}/usr/lib/libbz2.so"
fi
mkdir -p "${COOKBOOK_STAGE}/usr/lib/pkgconfig"
cp "${COOKBOOK_RECIPE}/pkgconfig" "${COOKBOOK_STAGE}/usr/lib/pkgconfig/bzip2.pc"

View File

@ -77,6 +77,18 @@ index 61ee752..4b140b9 100644
// POSIX threads.
#if !defined(ASIO_HAS_PTHREADS)
# if defined(ASIO_HAS_THREADS)
diff --git a/core/deps/picotcp/modules/pico_dev_ppp.c b/core/deps/picotcp/modules/pico_dev_ppp.c
index dcffacee..121ac27f 100644
--- a/core/deps/picotcp/modules/pico_dev_ppp.c
+++ b/core/deps/picotcp/modules/pico_dev_ppp.c
@@ -7,6 +7,7 @@
*********************************************************************/
+#include <alloca.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
diff --git a/core/hw/sh4/modules/mmu.cpp b/core/hw/sh4/modules/mmu.cpp
index af9de30e..6f839fc7 100644
--- a/core/hw/sh4/modules/mmu.cpp

View File

@ -1,10 +1,14 @@
[source]
tar = "https://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz"
blake3 = "57c095e0bb6e60e7b4a0597f51f7ac15b501ca0f95d37424d8d13978d28b8da3"
patches = [
"redox.patch"
]
[build]
template = "custom"
script = """
DYNAMIC_STATIC_INIT
export ac_cv_header_stdc=yes
COOKBOOK_CONFIGURE_FLAGS+=(
--prefix="${COOKBOOK_STAGE}/usr"
)

View File

@ -0,0 +1,14 @@
diff -ruwN source/tparam.c source-new/tparam.c
--- source/tparam.c 2002-02-25 17:37:24.000000000 +0000
+++ source-new/tparam.c 2026-09-22 15:11:03.072524045 +0000
@@ -38,6 +38,10 @@
#define bcopy(s, d, n) memcpy ((d), (s), (n))
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#endif /* not emacs */
#ifndef NULL

View File

@ -4,4 +4,4 @@ blake3 = "fad667bb04e16dca5e816969f2641bb075929cd73564114cc1aabd87d1975dd3"
patches = ["redox.patch"]
[build]
template = "configure"
template = "meson"