diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2012-03-26 12:05:51 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2012-03-26 12:05:51 +0000 |
commit | 4547077a2b9d0db426d45ab1a3538f8cfb093d4a (patch) | |
tree | a57c760433bc380281e0a61a49732a43d2dcf8c1 /llvm/lib/Support/Unix | |
parent | df2348ecf3a35f738b5daa0251dcdc17488cb9df (diff) | |
download | bcm5719-llvm-4547077a2b9d0db426d45ab1a3538f8cfb093d4a.tar.gz bcm5719-llvm-4547077a2b9d0db426d45ab1a3538f8cfb093d4a.zip |
Fix GetMainExecutable on kFreeBSD.
Patch by Sylvestre Ledru!
llvm-svn: 153435
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r-- | llvm/lib/Support/Unix/Path.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc index 418dc073349..b85b574ce38 100644 --- a/llvm/lib/Support/Unix/Path.inc +++ b/llvm/lib/Support/Unix/Path.inc @@ -256,7 +256,7 @@ Path::GetCurrentDirectory() { } #if defined(__FreeBSD__) || defined (__NetBSD__) || \ - defined(__OpenBSD__) || defined(__minix) + defined(__OpenBSD__) || defined(__minix) || defined(__FreeBSD_kernel__) static int test_dir(char buf[PATH_MAX], char ret[PATH_MAX], const char *dir, const char *bin) @@ -308,7 +308,7 @@ getprogpath(char ret[PATH_MAX], const char *bin) free(pv); return (NULL); } -#endif // __FreeBSD__ || __NetBSD__ +#endif // __FreeBSD__ || __NetBSD__ || __FreeBSD_kernel__ /// GetMainExecutable - Return the path to the main executable, given the /// value of argv[0] from program startup. @@ -325,7 +325,7 @@ Path Path::GetMainExecutable(const char *argv0, void *MainAddr) { return Path(link_path); } #elif defined(__FreeBSD__) || defined (__NetBSD__) || \ - defined(__OpenBSD__) || defined(__minix) + defined(__OpenBSD__) || defined(__minix) || defined(__FreeBSD_kernel__) char exe_path[PATH_MAX]; if (getprogpath(exe_path, argv0) != NULL) |