diff options
author | Ron Yorston <rmy@pobox.com> | 2020-08-23 10:59:38 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2020-08-23 10:59:38 +0100 |
commit | 5dbbfe22dd28c3b3ecd5763cc8e60406136e87ce (patch) | |
tree | 64c983708f9f2a21a2fbec14a06d85057d886dfd /libbb | |
parent | 64ecd10486934c12336dac84c67a1939dce0e096 (diff) | |
parent | a949399d178f7b052ada2099c62621736eafce44 (diff) | |
download | busybox-w32-5dbbfe22dd28c3b3ecd5763cc8e60406136e87ce.tar.gz busybox-w32-5dbbfe22dd28c3b3ecd5763cc8e60406136e87ce.tar.bz2 busybox-w32-5dbbfe22dd28c3b3ecd5763cc8e60406136e87ce.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/Config.src | 2 | ||||
-rw-r--r-- | libbb/Kbuild.src | 3 | ||||
-rw-r--r-- | libbb/last_char_is.c | 15 |
3 files changed, 7 insertions, 13 deletions
diff --git a/libbb/Config.src b/libbb/Config.src index 312aa1831..f97de8ef7 100644 --- a/libbb/Config.src +++ b/libbb/Config.src | |||
@@ -334,7 +334,6 @@ config FEATURE_VERBOSE_CP_MESSAGE | |||
334 | config FEATURE_USE_SENDFILE | 334 | config FEATURE_USE_SENDFILE |
335 | bool "Use sendfile system call" | 335 | bool "Use sendfile system call" |
336 | default y | 336 | default y |
337 | select PLATFORM_LINUX | ||
338 | help | 337 | help |
339 | When enabled, busybox will use the kernel sendfile() function | 338 | When enabled, busybox will use the kernel sendfile() function |
340 | instead of read/write loops to copy data between file descriptors | 339 | instead of read/write loops to copy data between file descriptors |
@@ -376,7 +375,6 @@ config FEATURE_SKIP_ROOTFS | |||
376 | config MONOTONIC_SYSCALL | 375 | config MONOTONIC_SYSCALL |
377 | bool "Use clock_gettime(CLOCK_MONOTONIC) syscall" | 376 | bool "Use clock_gettime(CLOCK_MONOTONIC) syscall" |
378 | default y | 377 | default y |
379 | select PLATFORM_LINUX | ||
380 | help | 378 | help |
381 | Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring | 379 | Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring |
382 | time intervals (time, ping, traceroute etc need this). | 380 | time intervals (time, ping, traceroute etc need this). |
diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src index dab1e6dae..d7cbb7ff1 100644 --- a/libbb/Kbuild.src +++ b/libbb/Kbuild.src | |||
@@ -116,7 +116,8 @@ lib-$(CONFIG_PLATFORM_POSIX) += warn_ignoring_args.o | |||
116 | lib-$(CONFIG_PLATFORM_POSIX) += write.o | 116 | lib-$(CONFIG_PLATFORM_POSIX) += write.o |
117 | lib-$(CONFIG_PLATFORM_POSIX) += xgethostbyname.o | 117 | lib-$(CONFIG_PLATFORM_POSIX) += xgethostbyname.o |
118 | 118 | ||
119 | lib-$(CONFIG_PLATFORM_LINUX) += match_fstype.o | 119 | lib-$(CONFIG_MOUNT) += match_fstype.o |
120 | lib-$(CONFIG_UMOUNT) += match_fstype.o | ||
120 | 121 | ||
121 | lib-$(CONFIG_FEATURE_UTMP) += utmp.o | 122 | lib-$(CONFIG_FEATURE_UTMP) += utmp.o |
122 | 123 | ||
diff --git a/libbb/last_char_is.c b/libbb/last_char_is.c index 918526e6c..fba05f974 100644 --- a/libbb/last_char_is.c +++ b/libbb/last_char_is.c | |||
@@ -11,14 +11,9 @@ | |||
11 | /* Find out if the last character of a string matches the one given */ | 11 | /* Find out if the last character of a string matches the one given */ |
12 | char* FAST_FUNC last_char_is(const char *s, int c) | 12 | char* FAST_FUNC last_char_is(const char *s, int c) |
13 | { | 13 | { |
14 | if (s) { | 14 | if (!s[0]) |
15 | size_t sz = strlen(s); | 15 | return NULL; |
16 | /* Don't underrun the buffer if the string length is 0 */ | 16 | while (s[1]) |
17 | if (sz != 0) { | 17 | s++; |
18 | s += sz - 1; | 18 | return (*s == (char)c) ? (char *) s : NULL; |
19 | if ((unsigned char)*s == c) | ||
20 | return (char*)s; | ||
21 | } | ||
22 | } | ||
23 | return NULL; | ||
24 | } | 19 | } |