summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/gstreamer
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-09-09 17:44:22 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-11 09:05:35 +0100
commit735e066b1cfa71bf552004cf24d528e0411b5c52 (patch)
tree80da621874cd8198900b179fcbda3f8f47cbd99a /meta/recipes-multimedia/gstreamer
parent09f94874fdf79dbc6c7fd340115afa7d665157ae (diff)
downloadpoky-735e066b1cfa71bf552004cf24d528e0411b5c52.tar.gz
gst-validate: Fix build on musl
Connect has different signature on musl. Fixes socket_interposer.c:103:1: error: conflicting types for 'connect' | connect (int socket, const struct sockaddr_in *addrin, socklen_t address_len) | ^ | recipe-sysroot/usr/include/sys/socket.h:327:5: note: previous declaration is here | int connect (int, const struct sockaddr *, socklen_t); | ^ (From OE-Core rev: 77c02f815103733bcfbde3adec3784e456de42d4) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/gstreamer')
-rw-r--r--meta/recipes-multimedia/gstreamer/files/0001-connect-has-a-different-signature-on-musl.patch38
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-validate_1.14.2.bb1
2 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/files/0001-connect-has-a-different-signature-on-musl.patch b/meta/recipes-multimedia/gstreamer/files/0001-connect-has-a-different-signature-on-musl.patch
new file mode 100644
index 0000000000..a0d215c5a0
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/0001-connect-has-a-different-signature-on-musl.patch
@@ -0,0 +1,38 @@
1From 0bd8004d8dddc486d3961a5316d24e8f2645e4c8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 9 Sep 2018 17:38:10 -0700
4Subject: [PATCH] connect has a different signature on musl
5
6On linux when not using glibc and using musl for C library, connect
7API has a different signature, this patch fixes this so it can compile
8on musl, the functionality should remain same as it is immediately
9typcasted to struct sockaddr_in* type inside the function before use
10
11Upstream-Status: Pending
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 plugins/fault_injection/socket_interposer.c | 7 ++++++-
16 1 file changed, 6 insertions(+), 1 deletion(-)
17
18diff --git a/plugins/fault_injection/socket_interposer.c b/plugins/fault_injection/socket_interposer.c
19index 53c1ebb..ad7adf8 100644
20--- a/plugins/fault_injection/socket_interposer.c
21+++ b/plugins/fault_injection/socket_interposer.c
22@@ -100,10 +100,15 @@ socket_interposer_set_callback (struct sockaddr_in *addrin,
23 }
24
25 int
26-connect (int socket, const struct sockaddr_in *addrin, socklen_t address_len)
27+#if defined(__linux__) && !defined(__GLIBC__)
28+connect (int socket, const struct sockaddr *addr, socklen_t address_len)
29+#else
30+connect (int socket, const struct sockaddr_in *addr, socklen_t address_len)
31+#endif
32 {
33 size_t i;
34 int override_errno = 0;
35+ struct sockaddr_in* addrin = (struct sockaddr_in*)addr;
36 typedef ssize_t (*real_connect_fn) (int, const struct sockaddr_in *,
37 socklen_t);
38 static real_connect_fn real_connect = 0;
diff --git a/meta/recipes-multimedia/gstreamer/gst-validate_1.14.2.bb b/meta/recipes-multimedia/gstreamer/gst-validate_1.14.2.bb
index cad64b2b80..f4438dc5a2 100644
--- a/meta/recipes-multimedia/gstreamer/gst-validate_1.14.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-validate_1.14.2.bb
@@ -7,6 +7,7 @@ LICENSE = "LGPLv2.1"
7LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" 7LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
8 8
9SRC_URI = "https://gstreamer.freedesktop.org/src/${BPN}/${BP}.tar.xz \ 9SRC_URI = "https://gstreamer.freedesktop.org/src/${BPN}/${BP}.tar.xz \
10 file://0001-connect-has-a-different-signature-on-musl.patch \
10 " 11 "
11SRC_URI[md5sum] = "f334102b0e706008505d00f7f5b5e023" 12SRC_URI[md5sum] = "f334102b0e706008505d00f7f5b5e023"
12SRC_URI[sha256sum] = "ea9e423e5470ef85ef8a0aea1714e7abfc49deb2ed282057367484cdeba6f19f" 13SRC_URI[sha256sum] = "ea9e423e5470ef85ef8a0aea1714e7abfc49deb2ed282057367484cdeba6f19f"