Files
RedBear-OS/recipes/dev/php84/redox.patch
T
vasilito 50b731f1b7 Red Bear OS — microkernel OS in Rust, based on Redox
Derivative of Redox OS (https://www.redox-os.org) adding:
- AMD GPU driver (amdgpu) via LinuxKPI compat layer
- ext4 filesystem support (ext4d scheme daemon)
- ACPI fixes for AMD bare metal (x2APIC, DMAR, IVRS, MCFG)
- Custom branding (hostname, os-release, boot identity)

Build system is full upstream Redox with RBOS overlay in local/.
Patches for kernel, base, and relibc are symlinked from local/patches/
and protected from make clean/distclean. Custom recipes live in
local/recipes/ with symlinks into the recipes/ search path.

Build:  make all CONFIG_NAME=redbear-full
Sync:   ./local/scripts/sync-upstream.sh
2026-04-12 19:05:00 +01:00

92 lines
3.2 KiB
Diff

diff -ruwN source/configure source-new/configure
--- source/configure 2026-01-14 00:17:10.000000000 +0700
+++ source-new/configure 2026-01-16 15:56:01.944755811 +0700
@@ -26007,7 +26007,7 @@
then :
ac_cv_lib_curl_curl_easy_perform=yes
else case e in #(
- e) ac_cv_lib_curl_curl_easy_perform=no ;;
+ e) ac_cv_lib_curl_curl_easy_perform=yes ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
@@ -37728,7 +37728,7 @@
then :
php_cv_lib_gd_works=yes
else case e in #(
- e) php_cv_lib_gd_works=no ;;
+ e) php_cv_lib_gd_works=yes ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
@@ -40464,7 +40464,7 @@
LIBS_SAVED=$LIBS
CFLAGS="$CFLAGS $GMP_CFLAGS"
LIBS="$LIBS $GMP_LIBS"
- gmp_check=no
+ gmp_check=yes
ac_fn_c_check_header_compile "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
if test "x$ac_cv_header_gmp_h" = xyes
then :
diff -ruwN source/ext/phar/Makefile.frag source-new/ext/phar/Makefile.frag
--- source/ext/phar/Makefile.frag 2026-01-14 00:17:10.000000000 +0700
+++ source-new/ext/phar/Makefile.frag 2026-01-16 15:56:01.946130660 +0700
@@ -30,7 +30,7 @@
-@test -f $(builddir)/phar/phar.inc || cp $(srcdir)/phar/phar.inc $(builddir)/phar/phar.inc
TEST_PHP_EXECUTABLE = $(shell $(PHP_EXECUTABLE) -v 2>&1)
-TEST_PHP_EXECUTABLE_RES = $(shell echo "$(TEST_PHP_EXECUTABLE)" | grep -c 'Exec format error')
+TEST_PHP_EXECUTABLE_RES = $(shell echo "$(TEST_PHP_EXECUTABLE)" | grep -E -c 'Exec format error|required file not found')
$(builddir)/phar.php: $(srcdir)/build_precommand.php $(srcdir)/phar/*.inc $(srcdir)/phar/*.php $(SAPI_CLI_PATH)
-@(echo "Generating phar.php"; \
diff -ruwN source/ext/posix/posix.c source-new/ext/posix/posix.c
--- source/ext/posix/posix.c 2026-01-14 00:17:10.000000000 +0700
+++ source-new/ext/posix/posix.c 2026-01-16 15:56:01.946290813 +0700
@@ -375,7 +375,7 @@
ZEND_PARSE_PARAMETERS_NONE();
- if ((ticks = times(&t)) == -1) {
+ {
POSIX_G(last_error) = errno;
RETURN_FALSE;
}
diff -ruwN source/sapi/fpm/fpm/fpm_status.c source-new/sapi/fpm/fpm/fpm_status.c
--- source/sapi/fpm/fpm/fpm_status.c 2026-01-14 00:17:10.000000000 +0700
+++ source-new/sapi/fpm/fpm/fpm_status.c 2026-01-16 15:57:37.781307156 +0700
@@ -84,6 +84,7 @@
continue;
}
/* prevent NaN */
+#ifdef HAVE_TIMES
if (proc_p->cpu_duration.tv_sec == 0 && proc_p->cpu_duration.tv_usec == 0) {
cpu = 0.;
} else {
@@ -91,6 +92,9 @@
proc_p->last_request_cpu.tms_cstime) / fpm_scoreboard_get_tick() /
(proc_p->cpu_duration.tv_sec + proc_p->cpu_duration.tv_usec / 1000000.) * 100.;
}
+#else
+ cpu = 0.;
+#endif
array_init(&fpm_proc_stat);
add_assoc_long(&fpm_proc_stat, "pid", proc_p->pid);
@@ -573,11 +577,15 @@
}
/* prevent NaN */
+#ifdef HAVE_TIMES
if (proc->cpu_duration.tv_sec == 0 && proc->cpu_duration.tv_usec == 0) {
cpu = 0.;
} else {
cpu = (proc->last_request_cpu.tms_utime + proc->last_request_cpu.tms_stime + proc->last_request_cpu.tms_cutime + proc->last_request_cpu.tms_cstime) / fpm_scoreboard_get_tick() / (proc->cpu_duration.tv_sec + proc->cpu_duration.tv_usec / 1000000.) * 100.;
}
+#else
+ cpu = 0.;
+#endif
if (proc->request_stage == FPM_REQUEST_ACCEPTING) {
duration = proc->duration;