1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-19 06:27:06 +00:00
termux-packages/ndk-patches/23c/syslog.patch
Henrik Grimler e7f4ad8b6d
scripts: rename termux_step_setup_toolchain to indicate NDK version
And keep ndk-patches in 23c/ subdirectory.  Run
termux_step_setup_toolchain_23c only if TERMUX_NDK_VERSION equals 23c.

This is a step towards having the possibility to use different NDK
versions.  Using a different NDK version than the one termux
officially supports should *really* not be done except for
testing/debug/development reasons, or if it is strictly necessary to
be able to compile a program (for example for packages that need a
fortran compiler, which at the moment is only supported with old
gcc-using NDKs).
2022-08-13 12:19:59 +02:00

27 lines
841 B
Diff

diff -uNr sysroot.orig/usr/include/syslog.h sysroot/usr/include/syslog.h
--- sysroot.orig/usr/include/syslog.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/syslog.h 2019-03-20 13:19:44.315965728 +0000
@@ -158,4 +158,22 @@
*/
void vsyslog(int __priority, const char* __fmt, va_list __args) __printflike(2, 0);
+static __inline__ void android_polyfill_syslog_r(int syslog_priority, void* d, const char* format, ...)
+{
+ (void) d;
+ va_list myargs;
+ va_start(myargs, format);
+ vsyslog(syslog_priority, format, myargs);
+ va_end(myargs);
+}
+
+static __inline__ void android_polyfill_vsyslog_r(int syslog_priority, void* d, const char* fmt, va_list ap)
+{
+ (void) d;
+ vsyslog(syslog_priority, fmt, ap);
+}
+
+#define syslog_r android_polyfill_syslog_r
+#define vsyslog_r android_polyfill_vsyslog_r
+
__END_DECLS