[compiler-rt] 79af731 - Fix PS4 build of compiler-rt runtime.

Douglas Yung via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 19:13:42 PDT 2020


Author: Douglas Yung
Date: 2020-05-14T02:11:16Z
New Revision: 79af7314fbde836854315ef7213076653076f20c

URL: https://github.com/llvm/llvm-project/commit/79af7314fbde836854315ef7213076653076f20c
DIFF: https://github.com/llvm/llvm-project/commit/79af7314fbde836854315ef7213076653076f20c.diff

LOG: Fix PS4 build of compiler-rt runtime.

In a previous change I added a shim for fork(), but when compiled from InstrProfiling.c, the
required header file was not included, so pid_t was undefined. This change adds that include.

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 428dae020798..5f5c85091fe8 100644
--- a/compiler-rt/lib/profile/InstrProfilingUtil.h
+++ b/compiler-rt/lib/profile/InstrProfilingUtil.h
@@ -32,6 +32,7 @@ int lprofUnlockFileHandle(FILE *F);
 FILE *lprofOpenFileEx(const char *Filename);
 /* PS4 doesn't have setenv/getenv/fork. Define a shim. */
 #if __ORBIS__
+#include <sys/types.h>
 static inline char *getenv(const char *name) { return NULL; }
 static inline int setenv(const char *name, const char *value, int overwrite)
 { return 0; }


        


More information about the llvm-commits mailing list