[libc] Add a minimal implementation of the POSIX fork function.
A very simple and minimal implementation of fork is added. Future
changes will add more functionality to satisfy POSIX and Linux
requirements.
An implementation of wait and a few support macros in sys/wait.h
have also been added to help with testing the fork function.
Reviewed By: lntue, michaelrj
Differential Revision: https://reviews.llvm.org/D135131
diff --git a/libc/include/sys/wait.h.def b/libc/include/sys/wait.h.def
new file mode 100644
index 0000000..b4fcce4
--- /dev/null
+++ b/libc/include/sys/wait.h.def
@@ -0,0 +1,18 @@
+//===-- POSIX header wait.h -----------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SYS_WAIT_H
+#define LLVM_LIBC_SYS_WAIT_H
+
+#include <__llvm-libc-common.h>
+
+#include <llvm-libc-macros/sys-wait-macros.h>
+
+%%public_api()
+
+#endif // LLVM_LIBC_SYS_WAIT_H