This avoids warnings due to unused functions when building.
+#define __sferror(p) (((p)->_flags & __SERR) != 0)
+
+/* Used by perl, fish, and others */
+#define __sferror(p) (((p)->_flags & __SERR) != 0)
+
+/* Used by perl, fish, and others */
-+static char* ctermid(char* s) {
++static __inline__ char* ctermid(char* s) {
+ if (s == 0) return (char*) "/dev/tty";
+ strcpy(s, "/dev/tty");
+ return s;
+ if (s == 0) return (char*) "/dev/tty";
+ strcpy(s, "/dev/tty");
+ return s;
+extern int open(const char*, int, ...);
+extern pid_t getpid();
+extern int unlink(const char*);
+extern int open(const char*, int, ...);
+extern pid_t getpid();
+extern int unlink(const char*);
-+static FILE* tmpfile() {
++static __inline__ FILE* tmpfile() {
+ int p = getpid();
+ char* path;
+ int i;
+ int p = getpid();
+ char* path;
+ int i;
extern void vsyslog_r(int, struct syslog_data *, const char *, va_list);
+extern /*const*/ char* __progname;
extern void vsyslog_r(int, struct syslog_data *, const char *, va_list);
+extern /*const*/ char* __progname;
-+static void android_polyfill_openlog(const char* a, int b, int c) {
++static __inline__ void android_polyfill_openlog(const char* a, int b, int c) {
+ (void) a;
+ (void) b;
+ (void) c;
+}
+ (void) a;
+ (void) b;
+ (void) c;
+}
-+static void android_polyfill_closelog() {}
++static __inline__ void android_polyfill_closelog() {}
-+static void android_polyfill_vsyslog(int syslog_priority, char const* format, va_list ap)
++static __inline__ void android_polyfill_vsyslog(int syslog_priority, char const* format, va_list ap)
+{
+ android_LogPriority a = ANDROID_LOG_FATAL;
+ switch (syslog_priority) {
+{
+ android_LogPriority a = ANDROID_LOG_FATAL;
+ switch (syslog_priority) {
+ free(syslog_text);
+}
+
+ free(syslog_text);
+}
+
-+static void android_polyfill_syslog(int priority, const char* format, ...)
++static __inline__ void android_polyfill_syslog(int priority, const char* format, ...)
+{
+ va_list myargs;
+ va_start(myargs, format);
+{
+ va_list myargs;
+ va_start(myargs, format);
-+static void android_polyfill_syslog_r(int syslog_priority, struct syslog_data* d, const char* format, ...)
++static __inline__ void android_polyfill_syslog_r(int syslog_priority, void* d, const char* format, ...)
+{
+ (void) d;
+ va_list myargs;
+{
+ (void) d;
+ va_list myargs;
-+static void android_polyfill_vsyslog_r(int syslog_priority, struct syslog_data* d, const char* fmt, va_list ap)
++static __inline__ void android_polyfill_vsyslog_r(int syslog_priority, void* d, const char* fmt, va_list ap)
+{
+ (void) d;
+ android_polyfill_vsyslog(syslog_priority, fmt, ap);
+{
+ (void) d;
+ android_polyfill_vsyslog(syslog_priority, fmt, ap);