[compiler-rt] 5435c5d - Add shim for fork() on PS4 as it is not supported there.

Douglas Yung via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 11:49:24 PDT 2020


Author: Douglas Yung
Date: 2020-05-13T18:47:01Z
New Revision: 5435c5def24e68b4cd54efa9e989cd78dbb9b8cc

URL: https://github.com/llvm/llvm-project/commit/5435c5def24e68b4cd54efa9e989cd78dbb9b8cc
DIFF: https://github.com/llvm/llvm-project/commit/5435c5def24e68b4cd54efa9e989cd78dbb9b8cc.diff

LOG: Add shim for fork() on PS4 as it is not supported there.

Reviewers: probinson

Subscribers: #sanitizers llvm-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D79839

Added: 
    

Modified: 
    compiler-rt/lib/profile/InstrProfilingUtil.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/profile/InstrProfilingUtil.h b/compiler-rt/lib/profile/InstrProfilingUtil.h
index f0e29a8803a0..428dae020798 100644
--- a/compiler-rt/lib/profile/InstrProfilingUtil.h
+++ b/compiler-rt/lib/profile/InstrProfilingUtil.h
@@ -30,11 +30,12 @@ int lprofUnlockFileHandle(FILE *F);
  * lock for exclusive access. The caller will block
  * if the lock is already held by another process. */
 FILE *lprofOpenFileEx(const char *Filename);
-/* PS4 doesn't have setenv/getenv. Define a shim. */
+/* PS4 doesn't have setenv/getenv/fork. Define a shim. */
 #if __ORBIS__
 static inline char *getenv(const char *name) { return NULL; }
 static inline int setenv(const char *name, const char *value, int overwrite)
 { return 0; }
+static pid_t fork() { return -1; }
 #endif /* #if __ORBIS__ */
 
 /* GCOV_PREFIX and GCOV_PREFIX_STRIP support */


        


More information about the llvm-commits mailing list