chiark / gitweb /
busybox: Update from 1.28.2 to 1.28.3
[termux-packages] / packages / busybox / coreutils-date.c.patch
1 diff -u -r ../busybox-1.26.2/coreutils/date.c ./coreutils/date.c
2 --- ../busybox-1.26.2/coreutils/date.c  2016-12-10 17:46:36.000000000 +0000
3 +++ ./coreutils/date.c  2017-07-06 22:15:17.528119028 +0000
4 @@ -293,9 +293,16 @@
5                 maybe_set_utc(opt);
6  
7                 /* if setting time, set it */
8 +#ifdef __ANDROID__
9 +               if (opt & OPT_SET) {
10 +                       /* stime(2) is not available on Android and is not allowed anyway. */
11 +                       bb_error_msg("can't set date: Operation not permitted");
12 +               }
13 +#else
14                 if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) {
15                         bb_perror_msg("can't set date");
16                 }
17 +#endif
18         }
19  
20         /* Display output */