1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-21 09:47:08 +00:00
termux-packages/packages/busybox/0006-miscutils-crond.patch
Henrik Grimler 218a206274 busybox: fix build with ndk r23
Compiler and tool names need to be updated in Makefile.

Also fix some patch offsets while we are at it
2021-10-22 23:05:45 +02:00

23 lines
773 B
Diff

diff -uNr busybox-1.31.1/miscutils/crond.c busybox-1.31.1.mod/miscutils/crond.c
--- busybox-1.31.1/miscutils/crond.c 2019-06-10 13:50:53.000000000 +0300
+++ busybox-1.31.1.mod/miscutils/crond.c 2019-11-11 22:04:10.820622087 +0200
@@ -435,7 +435,7 @@
maxLines = (strcmp(fileName, "root") == 0) ? 65535 : MAXLINES;
- if (fstat(fileno(parser->fp), &sbuf) == 0 && sbuf.st_uid == DAEMON_UID) {
+ if (fstat(fileno(parser->fp), &sbuf) == 0) {
CronFile *file = xzalloc(sizeof(CronFile));
CronLine **pline;
int n;
@@ -655,6 +655,9 @@
static void set_env_vars(struct passwd *pas, const char *shell)
{
+#ifdef __ANDROID__
+ return;
+#endif
/* POSIX requires crond to set up at least HOME, LOGNAME, PATH, SHELL.
* We assume crond inherited suitable PATH.
*/