fix test case for building with QNX

pull/460/head
JacobBarthelmeh 2022-09-15 15:04:17 -07:00
parent cace79e915
commit 3d7c766906
1 changed files with 9 additions and 1 deletions

View File

@ -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);