diff --git a/loader/icd_platform.h b/loader/icd_platform.h index 0f3e4329..da8a6d86 100644 --- a/loader/icd_platform.h +++ b/loader/icd_platform.h @@ -19,7 +19,7 @@ #ifndef _ICD_PLATFORM_H_ #define _ICD_PLATFORM_H_ -#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__QNXNTO__) #define PATH_SEPARATOR ':' #define DIRECTORY_SYMBOL '/' diff --git a/loader/linux/icd_linux.c b/loader/linux/icd_linux.c index 265215eb..c6f6b542 100644 --- a/loader/linux/icd_linux.c +++ b/loader/linux/icd_linux.c @@ -187,7 +187,11 @@ static inline void khrIcdOsDirEnumerate(const char *path, const char *env, break; memcpy(nameCopy, dirEntry->d_name, sz); dirElems[elemCount].d_name = nameCopy; +#if defined(__QNXNTO__) + dirElems[elemCount].d_type = _DEXTRA_FIRST(dirEntry)->d_type; +#else dirElems[elemCount].d_type = dirEntry->d_type; +#endif elemCount++; } qsort(dirElems, elemCount, sizeof(struct dirElem), compareDirElem); diff --git a/loader/linux/icd_linux_envvars.c b/loader/linux/icd_linux_envvars.c index bfac87c2..d61dea4e 100644 --- a/loader/linux/icd_linux_envvars.c +++ b/loader/linux/icd_linux_envvars.c @@ -32,7 +32,7 @@ char *khrIcd_getenv(const char *name) { } char *khrIcd_secure_getenv(const char *name) { -#if defined(__APPLE__) +#if defined(__APPLE__) || defined(__QNXNTO__) // Apple does not appear to have a secure getenv implementation. // The main difference between secure getenv and getenv is that secure getenv // returns NULL if the process is being run with elevated privileges by a normal user.