summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/os/os_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/os/os_misc.c')
-rw-r--r--src/gallium/auxiliary/os/os_misc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/os/os_misc.c b/src/gallium/auxiliary/os/os_misc.c
index 09d4400..a4d9628 100644
--- a/src/gallium/auxiliary/os/os_misc.c
+++ b/src/gallium/auxiliary/os/os_misc.c
@@ -46,8 +46,10 @@
#endif
-
-#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_SOLARIS)
+#if defined(PIPE_OS_ANDROID)
+# define LOG_TAG "gallium"
+# include <log/log.h>
+#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_SOLARIS)
# include <unistd.h>
#elif defined(PIPE_OS_APPLE) || defined(PIPE_OS_BSD)
# include <sys/sysctl.h>
@@ -100,6 +102,12 @@ os_log_message(const char *message)
fflush(fout);
}
#else /* !PIPE_SUBSYSTEM_WINDOWS */
+#if defined(PIPE_OS_ANDROID)
+ if (fout == stderr) {
+ ALOGD("%s", message);
+ return;
+ }
+#endif
fflush(stdout);
fputs(message, fout);
fflush(fout);