diff options
Diffstat (limited to 'alc/helpers.cpp')
-rw-r--r-- | alc/helpers.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/alc/helpers.cpp b/alc/helpers.cpp index 22483dd3..cd1d6498 100644 --- a/alc/helpers.cpp +++ b/alc/helpers.cpp @@ -218,6 +218,9 @@ void SetRTPriority(void) #ifdef __FreeBSD__ #include <sys/sysctl.h> #endif +#ifdef __HAIKU__ +#include <FindDirectory.h> +#endif #ifdef HAVE_PROC_PIDPATH #include <libproc.h> #endif @@ -256,6 +259,13 @@ const PathNamePair &GetProcBinary() pathname.insert(pathname.end(), procpath, procpath+strlen(procpath)); } #endif +#ifdef __HAIKU__ + char procpath[PATH_MAX]; + if(find_path(B_APP_IMAGE_SYMBOL, B_FIND_PATH_IMAGE_PATH, NULL, procpath, sizeof(procpath)) == B_OK) + { + pathname.insert(pathname.end(), procpath, procpath+strlen(procpath)); + } +#endif if(pathname.empty()) { static const char SelfLinkNames[][32]{ |