From d3ffaeb8d7ce2867fa199bee7d8e2c566b839351 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 21 Jul 2020 17:22:38 +0000 Subject: GetProcBinary implementation for Haiku. --- alc/helpers.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 #endif +#ifdef __HAIKU__ +#include +#endif #ifdef HAVE_PROC_PIDPATH #include #endif @@ -255,6 +258,13 @@ const PathNamePair &GetProcBinary() else 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()) { -- cgit v1.2.3