]> code.delx.au - pulseaudio/commitdiff
build-sys: Fix building with Android toolchain
authorAnton Lundin <glance@acc.umu.se>
Wed, 18 Sep 2013 14:22:00 +0000 (16:22 +0200)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Sat, 5 Oct 2013 04:19:20 +0000 (09:49 +0530)
Signed-off-by: Anton Lundin <glance@acc.umu.se>
src/daemon/main.c
src/pulsecore/core-util.c
src/pulsecore/rtkit.c

index 5b4e0053b61d561962e13e4ef49cf04914c94291..730c3a36e0a651e8af53cc18a60382a5068b3680 100644 (file)
@@ -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
index 19f1a836ff6e68d5e76b723b7a522b9dc9ac54ae..e925918954b8c0fcaaaaf7e0820399f356d80e4b 100644 (file)
 #include "rtkit.h"
 #endif
 
-#ifdef __linux__
+#if defined(__linux__) && !defined(__ANDROID__)
 #include <sys/personality.h>
 #endif
 
@@ -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
index d47610fe9c22922fa2e83066b160679c05baf6af..2b7eb6accccec8af44a97b3504fdc1ccc7869610 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "rtkit.h"
 
-#ifdef __linux__
+#if defined(__linux__) && !defined(__ANDROID__)
 
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE