Skip to content

Commit

Permalink
gowin: Himbaechel. Support DragonFlyBSD
Browse files Browse the repository at this point in the history
Signed-off-by: YRabbit <[email protected]>
  • Loading branch information
yrabbit authored and gatecat committed Sep 16, 2023
1 parent 8a54e5e commit f5996ff
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions common/kernel/command.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ std::string proc_self_dirname(void)
{
char buf[PATH_MAX + 1] = "", *path, *p;
// if case argv[0] contains a valid path, return it
if (strlen(npnr_path) > 0) {
p = strrchr(npnr_path, '/');
if (strlen(npnr_path) > 0 && (p = strrchr(npnr_path, '/')) != NULL) {
snprintf(buf, sizeof buf, "%*s/", (int)(npnr_path - p), npnr_path);
return buf;
}
Expand Down

0 comments on commit f5996ff

Please sign in to comment.