| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a28db5f commit 32cf344
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -115,8 +115,12 @@ static struct text_region FindNodeTextRegion() { | |||
| 115 | 115 | std::string exename; | |
| 116 | 116 | { | |
| 117 | 117 | char selfexe[PATH_MAX]; | |
| 118 | - ssize_t count = readlink("/proc/self/exe", selfexe, PATH_MAX); | ||
| 119 | - exename = std::string(selfexe, count); | ||
| 118 | + | ||
| 119 | + size_t size = sizeof(selfexe); | ||
| 120 | + if (uv_exepath(selfexe, &size)) | ||
| 121 | + return nregion; | ||
| 122 | + | ||
| 123 | + exename = std::string(selfexe, size); | ||
| 120 | 124 | } | |
| 121 | 125 | ||
| 122 | 126 | while (std::getline(ifs, map_line)) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments