diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2010-08-31 22:38:00 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2010-08-31 22:38:00 +0000 |
commit | 1d76ab7f56398c1ccc000e66a78402c928a3eb6b (patch) | |
tree | 70f63f86d6f2760bd552e20bbcb565b3299ee5d4 /lib/System/Unix | |
parent | 013bb3dee9d3cb4f2d83e00c3718eb40e2b4d149 (diff) |
Some fixes for NetBSD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Unix')
-rw-r--r-- | lib/System/Unix/Path.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/System/Unix/Path.inc b/lib/System/Unix/Path.inc index 3d88311b4e..44cb0081c5 100644 --- a/lib/System/Unix/Path.inc +++ b/lib/System/Unix/Path.inc @@ -282,7 +282,7 @@ Path::GetCurrentDirectory() { return Path(pathname); } -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined (__NetBSD__) static int test_dir(char buf[PATH_MAX], char ret[PATH_MAX], const char *dir, const char *bin) @@ -334,7 +334,7 @@ getprogpath(char ret[PATH_MAX], const char *bin) free(pv); return (NULL); } -#endif // __FreeBSD__ +#endif // __FreeBSD__ || __NetBSD__ /// GetMainExecutable - Return the path to the main executable, given the /// value of argv[0] from program startup. @@ -350,7 +350,7 @@ Path Path::GetMainExecutable(const char *argv0, void *MainAddr) { if (realpath(exe_path, link_path)) return Path(std::string(link_path)); } -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined (__NetBSD__) char exe_path[PATH_MAX]; if (getprogpath(exe_path, argv0) != NULL) |