mirror of
https://github.com/termux/termux-packages.git
synced 2025-05-11 20:13:22 +00:00
- Fixes https://github.com/termux/termux-packages/issues/948
- Partially fixes https://github.com/termux/termux-packages/issues/24176
- Partially fixes https://github.com/termux/termux-packages/issues/183
Previous attempts and progress:
- 880983e754
(2016)
- https://github.com/termux/termux-packages/pull/7625 (2021)
- https://github.com/termux/termux-packages/pull/14435 (2023)
This PR mainly implements the package in a termux-packages downstream-oriented way (heavy use of internal termux-packages repository code shared with other termux-packages).
There is discussion regarding the upstream-oriented way of implementation from the SBCL side (trying to non-cross-compile while avoiding use of any internal termux-packages repository code) here:
https://bugs.launchpad.net/sbcl/+bug/1956852
15 lines
728 B
Diff
15 lines
728 B
Diff
Disables use of close_range() on Android, which does not have
|
|
that function until API level 34 (Android 14)
|
|
|
|
--- a/src/runtime/run-program.c
|
|
+++ b/src/runtime/run-program.c
|
|
@@ -134,7 +134,7 @@ void closefds_range(unsigned int first, unsigned int last)
|
|
#if defined(LISP_FEATURE_OS_PROVIDES_CLOSE_RANGE_WRAPPER)
|
|
// Prefer the libc wrapper, if it exists at build time.
|
|
fds_closed = !close_range(first, last, 0);
|
|
-#elif defined(LISP_FEATURE_LINUX) && defined(__NR_close_range)
|
|
+#elif defined(LISP_FEATURE_LINUX) && defined(__NR_close_range) && !defined(LISP_FEATURE_ANDROID)
|
|
// Use syscall(2) if we could detect the syscall number at build time.
|
|
fds_closed = !syscall(__NR_close_range, first, last, 0);
|
|
#endif
|