← Commit list

c0943ac45

Denys Vlasenko
Denys Vlasenko
2021-04-14
SUCCESS Duration: 156s

Subject

platform.h: fix for Bionic >= 21 not having wait3()

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

include/platform.h+4 -0
@@ -424,6 +424,7 @@ typedef unsigned smalluint;
#define HAVE_NET_ETHERNET_H 1
#define HAVE_SYS_STATFS_H 1
#define HAVE_PRINTF_PERCENTM 1
+#define HAVE_WAIT3 1
#if defined(__UCLIBC__)
# if UCLIBC_VERSION < KERNEL_VERSION(0, 9, 32)
@@ -535,6 +536,9 @@ typedef unsigned smalluint;
# undef HAVE_STPCPY
# undef HAVE_STPNCPY
# endif
+# if __ANDROID_API__ >= 21
+# undef HAVE_WAIT3
+# endif
# undef HAVE_MEMPCPY
# undef HAVE_STRCHRNUL
# undef HAVE_STRVERSCMP
miscutils/time.c+7 -0
@@ -33,6 +33,13 @@
#include "libbb.h"
+#ifndef HAVE_WAIT3
+static pid_t wait3(int *status, int options, struct rusage *rusage)
+{
+ return wait4(-1, status, options, rusage);
+}
+#endif
+
/* Information on the resources used by a child process. */
typedef struct {
int waitstatus;