gallium: os_process fixes for Android
authorRob Herring <robh@kernel.org>
Wed, 28 Jun 2017 21:52:28 +0000 (17:52 -0400)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 30 Jun 2017 07:44:19 +0000 (08:44 +0100)
The function getprogname() is available on Android, since it reuses
various BSD solutions C runtime.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/auxiliary/os/os_process.c

index 6622b9b2bc07534ed5bcf91e62f7c22a58d0c235..035bd228e763d65787425f8a68d6fcdca39b43d5 100644 (file)
@@ -34,7 +34,7 @@
 #  include <windows.h>
 #elif defined(__GLIBC__) || defined(__CYGWIN__)
 #  include <errno.h>
-#elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE)
+#elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID)
 #  include <stdlib.h>
 #elif defined(PIPE_OS_HAIKU)
 #  include <kernel/OS.h>
@@ -86,7 +86,7 @@ os_get_process_name(char *procname, size_t size)
 
 #elif defined(__GLIBC__) || defined(__CYGWIN__)
       name = program_invocation_short_name;
-#elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE)
+#elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID)
       /* *BSD and OS X */
       name = getprogname();
 #elif defined(PIPE_OS_HAIKU)