[PATCH] D70033: Add a shim for setenv on PS4 since it does not exist on PS4

Douglas Yung via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 15:29:17 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rG7ebde1bf67da: Add a shim for setenv on PS4 since it does not exist. (authored by dyung).
Herald added a subscriber: Sanitizers.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70033/new/

https://reviews.llvm.org/D70033

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,9 +30,11 @@
  * 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 getenv. Define a shim. */
+/* PS4 doesn't have setenv/getenv. 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; }
 #endif /* #if __ORBIS__ */
 
 /* GCOV_PREFIX and GCOV_PREFIX_STRIP support */


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70033.228974.patch
Type: text/x-patch
Size: 742 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191112/93a6f2fa/attachment.bin>


More information about the llvm-commits mailing list