Skip to content

添加hdiff_dir在qnx平台的目录处理逻辑,使用_QNX_宏区分#437

Closed
Oshienai96 wants to merge 2 commits into
sisong:masterfrom
Oshienai96:master
Closed

添加hdiff_dir在qnx平台的目录处理逻辑,使用_QNX_宏区分#437
Oshienai96 wants to merge 2 commits into
sisong:masterfrom
Oshienai96:master

Conversation

@Oshienai96
Copy link
Copy Markdown

非常感谢您的代码分享。最近我遇到在qnx平台上的需求,在makefile里添加交叉编译配置,会遇到编译错误——”dirDiffPatch/dir_diff/dir_diff_tools.cpp:122:18: error: 'struct dirent' has no member named 'd_type'; did you mean 'd_name'?“
。因此我在里面参照windows下的处理思路,添加了qnx下的处理逻辑。
编译通过,验证在qnx 7.1上可正常运行。

@sisong
Copy link
Copy Markdown
Owner

sisong commented Dec 3, 2025

我对QNX系统不熟悉,看起来有和linux类似的opendir readdir closedir函数组合;
是否能够合并两种代码分支,而在不同的API特性的情况下才做一些特殊处理(用_QNX_宏)? (不是强制要求,现在看来分开可能更清晰)

Copy link
Copy Markdown
Author

@Oshienai96 Oshienai96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use stat struct to check path attributes if d_type is not available

@Oshienai96 Oshienai96 marked this pull request as draft December 5, 2025 03:10
@Oshienai96 Oshienai96 marked this pull request as ready for review December 5, 2025 03:11
@sisong sisong closed this in #438 Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants