notmuch: Update from 0.26.1 to 0.26.2
[termux-packages] / packages / busybox / networking-hostname.c.patch
1 diff -u -r ../busybox-1.26.2/networking/hostname.c ./networking/hostname.c
2 --- ../busybox-1.26.2/networking/hostname.c 2016-12-10 18:46:36.000000000 +0100
3 +++ ./networking/hostname.c 2017-07-07 00:19:07.993535998 +0200
4 @@ -58,11 +58,18 @@
5 }
6 if (ENABLE_FEATURE_CLEAN_UP)
7 config_close(parser);
8 +#ifdef __ANDROID__
9 + } else {
10 + /* sethostname() is not available on Android pre android-23 and not allowed anyway. */
11 + bb_error_msg_and_die("can't set hostname: Operation not permitted");
12 + }
13 +#else
14 } else if (sethostname(s, strlen(s))) {
15 // if (errno == EPERM)
16 // bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
17 bb_perror_msg_and_die("sethostname");
18 }
19 +#endif
20 }
21
22 /* Manpage circa 2009: