[Toybox] [PATCH 03/10] toys.h: Add __ANDROID__ checks where needed.

Georgi Chorbadzhiyski gf at unixsol.org
Wed Mar 7 16:38:55 PST 2012


---
 toys.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/toys.h b/toys.h
index 504e0dc..2dcbe74 100644
--- a/toys.h
+++ b/toys.h
@@ -15,7 +15,9 @@
 #include <grp.h>
 #include <inttypes.h>
 #include <limits.h>
+#ifndef __ANDROID__
 #include <pty.h>
+#endif
 #include <pwd.h>
 #include <setjmp.h>
 #include <stdarg.h>
@@ -27,9 +29,18 @@
 #include <sys/mman.h>
 #include <sys/mount.h>
 #include <sys/stat.h>
+#ifdef __ANDROID__
+#include <sys/statfs.h>
+#else
 #include <sys/statvfs.h>
+#endif
 #include <sys/sysinfo.h>
+#ifdef __ANDROID__
+#define SWAP_FLAG_PREFER 0x8000
+#define SWAP_FLAG_PRIO_SHIFT 0
+#else
 #include <sys/swap.h>
+#endif
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <unistd.h>
-- 
1.7.5.1




More information about the Toybox mailing list