diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-04-14 22:14:36 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-04-14 22:14:36 +0200 |
commit | c0943ac451051b734711b0c95731ae7c515dbb31 (patch) | |
tree | 88bf05eb7fa4a9f5aa91e243c01c50b94a36ab09 | |
parent | cca4c9f4c0878b08fac6dfe014148ddcd5aa7678 (diff) | |
download | busybox-w32-c0943ac451051b734711b0c95731ae7c515dbb31.tar.gz busybox-w32-c0943ac451051b734711b0c95731ae7c515dbb31.tar.bz2 busybox-w32-c0943ac451051b734711b0c95731ae7c515dbb31.zip |
platform.h: fix for Bionic >= 21 not having wait3()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | include/platform.h | 4 | ||||
-rw-r--r-- | miscutils/time.c | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h index 24efd186b..387b6f537 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -424,6 +424,7 @@ typedef unsigned smalluint; | |||
424 | #define HAVE_NET_ETHERNET_H 1 | 424 | #define HAVE_NET_ETHERNET_H 1 |
425 | #define HAVE_SYS_STATFS_H 1 | 425 | #define HAVE_SYS_STATFS_H 1 |
426 | #define HAVE_PRINTF_PERCENTM 1 | 426 | #define HAVE_PRINTF_PERCENTM 1 |
427 | #define HAVE_WAIT3 1 | ||
427 | 428 | ||
428 | #if defined(__UCLIBC__) | 429 | #if defined(__UCLIBC__) |
429 | # if UCLIBC_VERSION < KERNEL_VERSION(0, 9, 32) | 430 | # if UCLIBC_VERSION < KERNEL_VERSION(0, 9, 32) |
@@ -535,6 +536,9 @@ typedef unsigned smalluint; | |||
535 | # undef HAVE_STPCPY | 536 | # undef HAVE_STPCPY |
536 | # undef HAVE_STPNCPY | 537 | # undef HAVE_STPNCPY |
537 | # endif | 538 | # endif |
539 | # if __ANDROID_API__ >= 21 | ||
540 | # undef HAVE_WAIT3 | ||
541 | # endif | ||
538 | # undef HAVE_MEMPCPY | 542 | # undef HAVE_MEMPCPY |
539 | # undef HAVE_STRCHRNUL | 543 | # undef HAVE_STRCHRNUL |
540 | # undef HAVE_STRVERSCMP | 544 | # undef HAVE_STRVERSCMP |
diff --git a/miscutils/time.c b/miscutils/time.c index 0006c59d8..c4bcbcbc9 100644 --- a/miscutils/time.c +++ b/miscutils/time.c | |||
@@ -33,6 +33,13 @@ | |||
33 | 33 | ||
34 | #include "libbb.h" | 34 | #include "libbb.h" |
35 | 35 | ||
36 | #ifndef HAVE_WAIT3 | ||
37 | static pid_t wait3(int *status, int options, struct rusage *rusage) | ||
38 | { | ||
39 | return wait4(-1, status, options, rusage); | ||
40 | } | ||
41 | #endif | ||
42 | |||
36 | /* Information on the resources used by a child process. */ | 43 | /* Information on the resources used by a child process. */ |
37 | typedef struct { | 44 | typedef struct { |
38 | int waitstatus; | 45 | int waitstatus; |