From: Elliott Hughes Date: Sat, 22 Nov 2014 03:49:05 +0000 (-0600) Subject: A patch against your current ToT that builds in AOSP master. X-Git-Tag: upstream/0.5.2~134 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a29bb1ebe62ada2dad5fb50f84f23a497cd677a;p=platform%2Fupstream%2Ftoybox.git A patch against your current ToT that builds in AOSP --- diff --git a/lib/portability.c b/lib/portability.c index 17efc91..910b1ea 100644 --- a/lib/portability.c +++ b/lib/portability.c @@ -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 @@ ssize_t getline(char **linep, size_t *np, FILE *stream) { 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 --git a/lib/portability.h b/lib/portability.h index 548c128..2f2421d 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -187,9 +187,6 @@ ssize_t getline(char **lineptr, size_t *n, FILE *stream); #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 --git a/toys/other/pivot_root.c b/toys/other/pivot_root.c index 3e4beac..9a1f56c 100644 --- a/toys/other/pivot_root.c +++ b/toys/other/pivot_root.c @@ -22,7 +22,8 @@ config PIVOT_ROOT #define FOR_pivot_root #include "toys.h" -#include +#include +#include void pivot_root_main(void) {