Merge pull request #460 from JacobBarthelmeh/qnx

fix test case for building with QNX
pull/462/head
John Safranek 2022-09-16 15:44:46 -07:00 committed by GitHub
commit 54de7185ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);