Index: compiler-rt/trunk/lib/profile/InstrProfilingPort.h =================================================================== --- compiler-rt/trunk/lib/profile/InstrProfilingPort.h +++ compiler-rt/trunk/lib/profile/InstrProfilingPort.h @@ -25,6 +25,8 @@ #define COMPILER_RT_MAX_HOSTLEN 128 #ifdef _MSC_VER #define COMPILER_RT_GETHOSTNAME(Name, Len) gethostname(Name, Len) +#elif defined(__PS4__) +#define COMPILER_RT_GETHOSTNAME(Name, Len) (-1) #else #define COMPILER_RT_GETHOSTNAME(Name, Len) GetHostName(Name, Len) #define COMPILER_RT_HAS_UNAME 1 Index: compiler-rt/trunk/lib/profile/InstrProfilingUtil.h =================================================================== --- compiler-rt/trunk/lib/profile/InstrProfilingUtil.h +++ compiler-rt/trunk/lib/profile/InstrProfilingUtil.h @@ -10,7 +10,14 @@ #ifndef PROFILE_INSTRPROFILINGUTIL_H #define PROFILE_INSTRPROFILINGUTIL_H +#include + /*! \brief Create a directory tree. */ void __llvm_profile_recursive_mkdir(char *Pathname); +/* PS4 doesn't have getenv. Define a shim. */ +#if __PS4__ +static inline char *getenv(const char *name) { return NULL; } +#endif /* #if __PS4__ */ + #endif /* PROFILE_INSTRPROFILINGUTIL_H */