From 39ba27848f3a5524cabf7e57f9c600c3861b904a Mon Sep 17 00:00:00 2001 From: Josh Palmer Date: Mon, 26 Dec 2016 15:50:08 +0000 Subject: [PATCH] Add QNX-specific codepath for fill_pathname_application_path --- file_path_special.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/file_path_special.c b/file_path_special.c index 349359790d..1e8f7aad09 100644 --- a/file_path_special.c +++ b/file_path_special.c @@ -24,6 +24,10 @@ #include #endif +#ifdef __QNX__ +#include +#endif + #include #include #include @@ -242,6 +246,15 @@ void fill_pathname_application_path(char *s, size_t len) return; } } +#elif defined(__QNX__) + char *buff = malloc(len); + + if(_cmdname(buff)) + { + strlcpy(s, buff, len); + } + + free(buff); #else { pid_t pid;