Fix PS4 build of compiler-rt runtime.
authorDouglas Yung <douglas.yung@sony.com>
Thu, 14 May 2020 02:11:16 +0000 (02:11 +0000)
committerDouglas Yung <douglas.yung@sony.com>
Thu, 14 May 2020 02:11:16 +0000 (02:11 +0000)
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.

compiler-rt/lib/profile/InstrProfilingUtil.h

index 428dae0..5f5c850 100644 (file)
@@ -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; }