head 1.2; access; symbols; locks; strict; comment @ * @; 1.2 date 2026.08.30.09.15.36; author drixter; state Exp; branches; next 1.1; commitid cUiBAHiBy3oqRDTG; 1.1 date 2026.08.29.19.55.15; author drixter; state Exp; branches; next ; commitid zquWNsdKsQkTqzTG; desc @@ 1.2 log @knot: Fix patch path typo @ text @$NetBSD$ Fix from upstream to properly compile on SunOS --- src/utils/knotc/interactive.c.orig 2026-08-29 19:17:24.182700199 +0000 +++ src/utils/knotc/interactive.c @@@@ -359,11 +359,16 @@@@ static void path_lookup(EditLine *el, co struct stat sb; for (int i = 0; i < nnames; ++i) { const struct dirent *it = namelist[i]; +#ifdef __sun + strlcpy(base, it->d_name, PATH_MAX - (size_t)(base - path)); + bool is_dir = !stat(path, &sb) && S_ISDIR(sb.st_mode); +#else bool is_dir = (it->d_type == DT_DIR); if (it->d_type == DT_LNK) { strlcpy(base, it->d_name, PATH_MAX - (size_t)(base - path)); is_dir = !stat(path, &sb) && S_ISDIR(sb.st_mode); } +#endif if ((!dirsonly || is_dir) && (strcmp(it->d_name, ".") && strcmp(it->d_name, ".."))) { char buf[NAME_MAX + 2]; // Max. name length + slash + terminator. @ 1.1 log @knot: Fix from upstream to properly compile on SunOS @ text @d5 2 a6 2 --- /usr/work/amd64/wip/knot/work/knot-3.5.7/src/utils/knotc/interactive.c.orig 2026-08-29 19:17:24.182700199 +0000 +++ /usr/work/amd64/wip/knot/work/knot-3.5.7/src/utils/knotc/interactive.c @