Skip to content

Commit 54de718

Browse files
authored
Merge pull request #460 from JacobBarthelmeh/qnx
fix test case for building with QNX
2 parents cace79e + 3d7c766 commit 54de718

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

apps/wolfsshd/test/test_configuration.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,15 @@ static void CleanupWildcardTest(void)
3434

3535
if (!WOPENDIR(NULL, NULL, &dir, "./sshd_config.d/")) {
3636
while ((d = WREADDIR(&dir)) != NULL) {
37-
if (d->d_type != DT_DIR) {
37+
#if defined(__QNX__) || defined(__QNXNTO__)
38+
struct stat s;
39+
40+
lstat(d->d_name, &s);
41+
if (!S_ISDIR(s.st_mode))
42+
#else
43+
if (d->d_type != DT_DIR)
44+
#endif
45+
{
3846
WSNPRINTF(filepath, sizeof filepath, "%s%s",
3947
"./sshd_config.d/", d->d_name);
4048
WREMOVE(0, filepath);

0 commit comments

Comments
 (0)