diff options
author | kcat <[email protected]> | 2020-07-21 10:27:43 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-21 10:27:43 -0700 |
commit | 4817d8218541c594d1d996a7d7e009eddab19e40 (patch) | |
tree | eaa378ccb0081b0f0cc002b76b23e8a33ce4fd90 | |
parent | f409cb4039260031b3d0c7779a0970034334139d (diff) | |
parent | d3ffaeb8d7ce2867fa199bee7d8e2c566b839351 (diff) |
Merge pull request #453 from devnexen/haiku_support_completion
GetProcBinary implementation for Haiku.
-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]{ |