[PATCH] Support building pulseaudio with Android NDK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 src/daemon/main.c         | 2 +-
 src/pulsecore/core-util.c | 8 ++++----
 src/pulsecore/rtkit.c     | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/daemon/main.c b/src/daemon/main.c
index 5b4e005..730c3a3 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -1003,7 +1003,7 @@ int main(int argc, char *argv[]) {
         pa_log_info(_("Dude, your kernel stinks! The chef's recommendation today is Linux with high-resolution timers enabled!"));
 
     if (conf->lock_memory) {
-#ifdef HAVE_SYS_MMAN_H
+#if defined(HAVE_SYS_MMAN_H) && !defined(__ANDROID__)
         if (mlockall(MCL_FUTURE) < 0)
             pa_log_warn("mlockall() failed: %s", pa_cstrerror(errno));
         else
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 19f1a83..04d3495 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -117,7 +117,7 @@
 #include "rtkit.h"
 #endif
 
-#ifdef __linux__
+#if defined(__linux__) && !defined(__ANDROID__)
 #include <sys/personality.h>
 #endif
 
@@ -305,7 +305,7 @@ again:
 #endif
         goto fail;
 
-#ifndef OS_IS_WIN32
+#if !defined(OS_IS_WIN32) && !defined(__ANDROID__)
     if (!S_ISDIR(st.st_mode) ||
         (st.st_uid != uid) ||
         (st.st_gid != gid) ||
@@ -2939,7 +2939,7 @@ char *pa_machine_id(void) {
     if ((h = pa_get_host_name_malloc()))
         return h;
 
-#ifndef OS_IS_WIN32
+#if !defined(OS_IS_WIN32) && !defined(__ANDROID__)
     /* If no hostname was set we use the POSIX hostid. It's usually
      * the IPv4 address.  Might not be that stable. */
     return pa_sprintf_malloc("%08lx", (unsigned long) gethostid());
@@ -3226,7 +3226,7 @@ size_t pa_pipe_buf(int fd) {
 
 void pa_reset_personality(void) {
 
-#ifdef __linux__
+#if defined(__linux__) && !defined(__ANDROID__)
     if (personality(PER_LINUX) < 0)
         pa_log_warn("Uh, personality() failed: %s", pa_cstrerror(errno));
 #endif
diff --git a/src/pulsecore/rtkit.c b/src/pulsecore/rtkit.c
index d47610f..2b7eb6a 100644
--- a/src/pulsecore/rtkit.c
+++ b/src/pulsecore/rtkit.c
@@ -29,7 +29,7 @@
 
 #include "rtkit.h"
 
-#ifdef __linux__
+#if defined(__linux__) && !defined(__ANDROID__)
 
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
-- 
1.8.1.2



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux