Skip to content

Commit

Permalink
busybox: fix segfault on some applets
Browse files Browse the repository at this point in the history
  • Loading branch information
licy183 committed Sep 27, 2024
1 parent 98455dc commit 5422c1b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions packages/busybox/0014-fix-segfault.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
https://github.com/termux/termux-packages/issues/21522

--- a/include/libbb.h
+++ b/include/libbb.h
@@ -382,6 +382,10 @@
#ifndef BB_GLOBAL_CONST
# define BB_GLOBAL_CONST const
#endif
+#ifdef __clang__
+# undef BB_GLOBAL_CONST
+# define BB_GLOBAL_CONST
+#endif

#if defined(errno)
/* If errno is a define, assume it's "define errno (*__errno_location())"
2 changes: 1 addition & 1 deletion packages/busybox/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Tiny versions of many common UNIX utilities into a singl
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.36.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314
TERMUX_PKG_BUILD_IN_SRC=true
Expand Down

0 comments on commit 5422c1b

Please sign in to comment.