[PATCH] D79839: Add shim for fork() on PS4
Douglas Yung via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 12 23:57:43 PDT 2020
dyung created this revision.
dyung added a reviewer: probinson.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
Add a shim for fork() since it is not supported on the PS4 platform.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D79839
Files:
compiler-rt/lib/profile/InstrProfilingUtil.h
Index: compiler-rt/lib/profile/InstrProfilingUtil.h
===================================================================
--- compiler-rt/lib/profile/InstrProfilingUtil.h
+++ compiler-rt/lib/profile/InstrProfilingUtil.h
@@ -30,11 +30,12 @@
* 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 */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79839.263622.patch
Type: text/x-patch
Size: 791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200513/7d690552/attachment.bin>
More information about the llvm-commits
mailing list