From 3d7c76690613bf7d48e487fa99338942248a919b Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Thu, 15 Sep 2022 15:04:17 -0700 Subject: [PATCH] fix test case for building with QNX --- apps/wolfsshd/test/test_configuration.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/wolfsshd/test/test_configuration.c b/apps/wolfsshd/test/test_configuration.c index 043eab91..1528731e 100644 --- a/apps/wolfsshd/test/test_configuration.c +++ b/apps/wolfsshd/test/test_configuration.c @@ -34,7 +34,15 @@ static void CleanupWildcardTest(void) if (!WOPENDIR(NULL, NULL, &dir, "./sshd_config.d/")) { while ((d = WREADDIR(&dir)) != NULL) { - if (d->d_type != DT_DIR) { + #if defined(__QNX__) || defined(__QNXNTO__) + struct stat s; + + lstat(d->d_name, &s); + if (!S_ISDIR(s.st_mode)) + #else + if (d->d_type != DT_DIR) + #endif + { WSNPRINTF(filepath, sizeof filepath, "%s%s", "./sshd_config.d/", d->d_name); WREMOVE(0, filepath);