Add legacy inline for wait4.
This wasn't added to Android until android-18. Note that the reason
I'm adding an inline here even though I just reverted a bunch of
inlines in the previous commit is because this was an inline in the
legacy NDK headers. If it was in the old headers, it needs to be in
the unified headers. If it wasn't, it needs to be in
libandroid_support.
Test: ./tools/update_headers.py && make ndk && make native
# Copied into working directory for unified headers NDK work.
ndk/checkbuild.py
ndk/run_tests.py --force-unified-headers
Bug: None
Change-Id: I751520a1df34b3edb5c59b4bd47170c4634a1883
diff --git a/libc/include/sys/wait.h b/libc/include/sys/wait.h
index 90eb35b..f3972fc 100644
--- a/libc/include/sys/wait.h
+++ b/libc/include/sys/wait.h
@@ -51,7 +51,11 @@
pid_t wait(int*);
pid_t waitpid(pid_t, int*, int);
+#if __ANDROID_API__ >= 18
pid_t wait4(pid_t, int*, int, struct rusage*) __INTRODUCED_IN(18);
+#else
+// Implemented as a static inline before 18.
+#endif
/* Posix states that idtype_t should be an enumeration type, but
* the kernel headers define P_ALL, P_PID and P_PGID as constant macros
@@ -63,4 +67,6 @@
__END_DECLS
+#include <android/legacy_sys_wait_inlines.h>
+
#endif /* _SYS_WAIT_H_ */