gallium/aux: Fill in Haiku get process name code
authorAlexander von Gluck IV <kallisti5@unixzen.com>
Mon, 18 Aug 2014 21:01:48 +0000 (21:01 +0000)
committerAlexander von Gluck IV <kallisti5@unixzen.com>
Tue, 19 Aug 2014 14:03:05 +0000 (10:03 -0400)
Acked-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/os/os_process.c

index 3e060b969b619c1d4a20ad3774825c869be3e645..a6262283d872c5181e168a9aaef601ae2d6adaba 100644 (file)
@@ -36,6 +36,9 @@
 #  include <errno.h>
 #elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE)
 #  include <stdlib.h>
+#elif defined(PIPE_OS_HAIKU)
+#  include <kernel/OS.h>
+#  include <kernel/image.h>
 #else
 #warning unexpected platform in os_process.c
 #endif
@@ -73,6 +76,10 @@ os_get_process_name(char *procname, size_t size)
 #elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE)
    /* *BSD and OS X */
    name = getprogname();
+#elif defined(PIPE_OS_HAIKU)
+   image_info info;
+   get_image_info(B_CURRENT_TEAM, &info);
+   name = info.name;
 #else
 #warning unexpected platform in os_process.c
    return FALSE;