emacs: can't use %n in printf/sprintf format string on android
This commit is contained in:
parent
d8646ab1aa
commit
958acc584d
@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Extensible, customizable text editor-and more"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=27.2
|
||||
TERMUX_PKG_REVISION=7
|
||||
TERMUX_PKG_REVISION=8
|
||||
TERMUX_PKG_SRCURL=https://ftp.gnu.org/gnu/emacs/emacs-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=b4a7cc4e78e63f378624e0919215b910af5bb2a0afc819fad298272e9f40c1b9
|
||||
TERMUX_PKG_DEPENDS="ncurses, gnutls, libxml2, libjansson"
|
||||
|
19
packages/emacs/no-procent_n-android.patch
Normal file
19
packages/emacs/no-procent_n-android.patch
Normal file
@ -0,0 +1,19 @@
|
||||
--- ./src/emacs.c~ 2021-12-24 16:44:24.693460891 +0100
|
||||
+++ ./src/emacs.c 2021-12-24 23:09:28.461964680 +0100
|
||||
@@ -2462,13 +2462,13 @@
|
||||
reset_all_sys_modes ();
|
||||
if (sig && sig != SIGTERM)
|
||||
{
|
||||
- static char const fmt[] = "Fatal error %d: %n%s\n";
|
||||
- char buf[max ((sizeof fmt - sizeof "%d%n%s\n"
|
||||
+ static char const fmt[] = "Fatal error %d: %s\n";
|
||||
+ char buf[max ((sizeof fmt - sizeof "%d%s\n"
|
||||
+ INT_STRLEN_BOUND (int) + 1),
|
||||
min (PIPE_BUF, MAX_ALLOCA))];
|
||||
char const *sig_desc = safe_strsignal (sig);
|
||||
int nlen;
|
||||
- int buflen = snprintf (buf, sizeof buf, fmt, sig, &nlen, sig_desc);
|
||||
+ int buflen = snprintf (buf, sizeof buf, fmt, sig, sig_desc);
|
||||
if (0 <= buflen && buflen < sizeof buf)
|
||||
emacs_write (STDERR_FILENO, buf, buflen);
|
||||
else
|
Loading…
Reference in New Issue
Block a user