summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-05-14 10:35:22 +0300
committerSebastian Dröge <sebastian@centricular.com>2016-05-14 10:35:22 +0300
commit056dc09609fae74d94899ed8d5ff71832d73a0a0 (patch)
treec5c510b1575e3a1c62c7fa5c6b25950cc35c6b9d /data
parent333e1d2b7d96049cc05a753d3409a91ae283eecd (diff)
android: Work around NDK ABI incompatibility
Workaround for Android <21 making signal() an inline function around bsd_signal(), and Android >= 21 not having any bsd_signal() symbol but only signal() https://bugzilla.gnome.org/show_bug.cgi?id=766235
Diffstat (limited to 'data')
-rw-r--r--data/ndk-build/gstreamer_android-1.0.c.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/data/ndk-build/gstreamer_android-1.0.c.in b/data/ndk-build/gstreamer_android-1.0.c.in
index 6c50e2dc..54ede21d 100644
--- a/data/ndk-build/gstreamer_android-1.0.c.in
+++ b/data/ndk-build/gstreamer_android-1.0.c.in
@@ -3,6 +3,17 @@
#include <gio/gio.h>
#include <android/log.h>
+/* XXX: Workaround for Android <21 making signal() an inline function
+ * around bsd_signal(), and Android >= 21 not having any bsd_signal()
+ * symbol but only signal().
+ * See https://bugzilla.gnome.org/show_bug.cgi?id=766235
+ */
+__sighandler_t bsd_signal(int signum, __sighandler_t handler) __attribute__((weak));
+__sighandler_t bsd_signal(int signum, __sighandler_t handler)
+{
+ return signal(signum, handler);
+}
+
static jobject _context = NULL;
static jobject _class_loader = NULL;
static GstClockTime _priv_gst_info_start_time;