From b6df0bc95a7c8bee3fd43dea771e53a59cc1d597 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 26 Jun 2013 05:25:44 +0000 Subject: Fix the build when __APPLE__ is defined. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184917 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Unix/PathV2.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/Support/Unix') diff --git a/lib/Support/Unix/PathV2.inc b/lib/Support/Unix/PathV2.inc index c7a1c92d46..588f9e8dd1 100644 --- a/lib/Support/Unix/PathV2.inc +++ b/lib/Support/Unix/PathV2.inc @@ -50,6 +50,10 @@ #include #endif +#ifdef __APPLE__ +#include +#endif + // Both stdio.h and cstdio are included via different pathes and // stdcxx's cstdio doesn't include stdio.h, so it doesn't #undef the macros // either. @@ -177,7 +181,7 @@ std::string getMainExecutable(const char *argv0, void *MainAddr) { if (_NSGetExecutablePath(exe_path, &size) == 0) { char link_path[MAXPATHLEN]; if (realpath(exe_path, link_path)) - return Path(link_path); + return link_path; } #elif defined(__FreeBSD__) || defined (__NetBSD__) || defined(__Bitrig__) || \ defined(__OpenBSD__) || defined(__minix) || defined(__FreeBSD_kernel__) -- cgit v1.2.3