Bug 255315 - misc/vifm fix macro 'BSD' is not defined on 13.0-RELEASE
Summary: misc/vifm fix macro 'BSD' is not defined on 13.0-RELEASE
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Nicola Vitale
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-22 02:35 UTC by Yevhenii Ftomov
Modified: 2024-02-08 10:57 UTC (History)
2 users (show)

See Also:
mp39590: maintainer-feedback+


Attachments
patch (282 bytes, patch)
2021-04-22 02:35 UTC, Yevhenii Ftomov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yevhenii Ftomov 2021-04-22 02:35:38 UTC
Created attachment 224346 [details]
patch

Macro 'BSD' is required for correct package logic. In particular function 'is_dir_fast' defined in src/utils/fs.c uses this macro to select method for checking if 'path' variable is a directory. If macro is not defined then paths to executables are detected as directories. For example, executable '/usr/local/bin/feh' is reported by 'is_dir' function as directory.

This incorrect reports lead to various bugs:
1. Files with extensions can't be opened by registered programs ( defined by filextype ). Default editor (Vim) used instead.
2. During copy directory there are error messages like 'Target path specifies existing directory'
3. Files with 'sticky bit' are displayed as directories

Working solution is to add 'BSD' macro to compilation flags in package Makefile:
CFLAGS+=	-fcommon -DBSD

Thanks.