ndk_patches: Use __inline__ for custom functions
This avoids warnings due to unused functions when building.
This commit is contained in:
parent
a1b245c64e
commit
5c36f4e054
@ -37,7 +37,7 @@ diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/incl
|
|||||||
+#define __sferror(p) (((p)->_flags & __SERR) != 0)
|
+#define __sferror(p) (((p)->_flags & __SERR) != 0)
|
||||||
+
|
+
|
||||||
+/* Used by perl, fish, and others */
|
+/* Used by perl, fish, and others */
|
||||||
+static char* ctermid(char* s) {
|
+static __inline__ char* ctermid(char* s) {
|
||||||
+ if (s == 0) return (char*) "/dev/tty";
|
+ if (s == 0) return (char*) "/dev/tty";
|
||||||
+ strcpy(s, "/dev/tty");
|
+ strcpy(s, "/dev/tty");
|
||||||
+ return s;
|
+ return s;
|
||||||
@ -55,7 +55,7 @@ diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/incl
|
|||||||
+extern int open(const char*, int, ...);
|
+extern int open(const char*, int, ...);
|
||||||
+extern pid_t getpid();
|
+extern pid_t getpid();
|
||||||
+extern int unlink(const char*);
|
+extern int unlink(const char*);
|
||||||
+static FILE* tmpfile() {
|
+static __inline__ FILE* tmpfile() {
|
||||||
+ int p = getpid();
|
+ int p = getpid();
|
||||||
+ char* path;
|
+ char* path;
|
||||||
+ int i;
|
+ int i;
|
||||||
|
@ -15,14 +15,14 @@ diff -Nur /Users/fornwall/lib/android-ndk/platforms/android-18/arch-arm/usr/incl
|
|||||||
extern void vsyslog_r(int, struct syslog_data *, const char *, va_list);
|
extern void vsyslog_r(int, struct syslog_data *, const char *, va_list);
|
||||||
|
|
||||||
+extern /*const*/ char* __progname;
|
+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) a;
|
||||||
+ (void) b;
|
+ (void) b;
|
||||||
+ (void) c;
|
+ (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;
|
+ android_LogPriority a = ANDROID_LOG_FATAL;
|
||||||
+ switch (syslog_priority) {
|
+ switch (syslog_priority) {
|
||||||
@ -41,7 +41,7 @@ diff -Nur /Users/fornwall/lib/android-ndk/platforms/android-18/arch-arm/usr/incl
|
|||||||
+ 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_list myargs;
|
||||||
+ va_start(myargs, format);
|
+ va_start(myargs, format);
|
||||||
@ -49,7 +49,7 @@ diff -Nur /Users/fornwall/lib/android-ndk/platforms/android-18/arch-arm/usr/incl
|
|||||||
+ va_end(myargs);
|
+ va_end(myargs);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+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;
|
+ (void) d;
|
||||||
+ va_list myargs;
|
+ va_list myargs;
|
||||||
@ -58,7 +58,7 @@ diff -Nur /Users/fornwall/lib/android-ndk/platforms/android-18/arch-arm/usr/incl
|
|||||||
+ va_end(myargs);
|
+ va_end(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;
|
+ (void) d;
|
||||||
+ android_polyfill_vsyslog(syslog_priority, fmt, ap);
|
+ android_polyfill_vsyslog(syslog_priority, fmt, ap);
|
||||||
|
Loading…
Reference in New Issue
Block a user