[sanitizers] execve & waitpid on mac.
authorMike Aizatsky <aizatsky@chromium.org>
Tue, 26 Jan 2016 22:53:52 +0000 (22:53 +0000)
committerMike Aizatsky <aizatsky@chromium.org>
Tue, 26 Jan 2016 22:53:52 +0000 (22:53 +0000)
llvm-svn: 258874

compiler-rt/lib/sanitizer_common/sanitizer_mac.cc

index 5d81eae..3702cf5 100644 (file)
@@ -68,6 +68,7 @@ extern "C" {
 #include <sys/stat.h>
 #include <sys/sysctl.h>
 #include <sys/types.h>
+#include <sys/wait.h>
 #include <unistd.h>
 #include <util.h>
 
@@ -199,6 +200,15 @@ uptr internal_ftruncate(fd_t fd, uptr size) {
   return ftruncate(fd, size);
 }
 
+uptr internal_execve(const char *filename, char *const argv[],
+                     char *const envp[]) {
+  return execve(filename, argv, envp);
+}
+
+uptr internal_waitpid(int pid, int *status, int options) {
+  return waitpid(pid, status, options);
+}
+
 // ----------------- sanitizer_common.h
 bool FileExists(const char *filename) {
   struct stat st;