# HG changeset patch # User Elliott Hughes # Date 1416628145 21600 # Node ID da72fa267b7bffa938523f8543ac949d46a50d0c # Parent 272bd62cb19463ccf75fc74329aa73e3e44c1842 A patch against your current ToT that builds in AOSP master. diff -r 272bd62cb194 -r da72fa267b7b lib/portability.c --- a/lib/portability.c Fri Nov 21 10:06:45 2014 -0600 +++ b/lib/portability.c Fri Nov 21 21:49:05 2014 -0600 @@ -5,11 +5,8 @@ */ #include "toys.h" -#if defined(__ANDROID__) -#include -#endif -#if defined(__APPLE__) || defined(__ANDROID__) +#if defined(__APPLE__) ssize_t getdelim(char **linep, size_t *np, int delim, FILE *stream) { int ch; @@ -62,16 +59,7 @@ { return getdelim(linep, np, '\n', stream); } -#endif -#if defined(__ANDROID__) -int sethostname(const char *name, size_t len) -{ - return syscall(__NR_sethostname, name, len); -} -#endif - -#if defined(__APPLE__) extern char **environ; int clearenv(void) diff -r 272bd62cb194 -r da72fa267b7b lib/portability.h --- a/lib/portability.h Fri Nov 21 10:06:45 2014 -0600 +++ b/lib/portability.h Fri Nov 21 21:49:05 2014 -0600 @@ -187,9 +187,6 @@ #include // Android is missing some headers and functions -#if defined(__ANDROID__) -int sethostname(const char *name, size_t len); -#endif // "generated/config.h" is included first #if CFG_TOYBOX_SHADOW #include diff -r 272bd62cb194 -r da72fa267b7b toys/other/pivot_root.c --- a/toys/other/pivot_root.c Fri Nov 21 10:06:45 2014 -0600 +++ b/toys/other/pivot_root.c Fri Nov 21 21:49:05 2014 -0600 @@ -22,7 +22,8 @@ #define FOR_pivot_root #include "toys.h" -#include +#include +#include void pivot_root_main(void) {