[oe-commits] [openembedded-core] 12/23: gst-validate: Fix build on musl

git at git.openembedded.org git at git.openembedded.org
Mon Sep 10 20:01:54 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 547e52ca5ab3a02dee38958aee3eac941ef701bd
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Sun Sep 9 17:44:22 2018 -0700

    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);
    |     ^
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 ...connect-has-a-different-signature-on-musl.patch | 38 ++++++++++++++++++++++
 .../gstreamer/gst-validate_1.14.2.bb               |  1 +
 2 files changed, 39 insertions(+)

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 0000000..a0d215c
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/0001-connect-has-a-different-signature-on-musl.patch
@@ -0,0 +1,38 @@
+From 0bd8004d8dddc486d3961a5316d24e8f2645e4c8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Sun, 9 Sep 2018 17:38:10 -0700
+Subject: [PATCH] connect has a different signature on musl
+
+On linux when not using glibc and using musl for C library, connect
+API has a different signature, this patch fixes this so it can compile
+on musl, the functionality should remain same as it is immediately
+typcasted to struct sockaddr_in* type inside the function before use
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ plugins/fault_injection/socket_interposer.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/fault_injection/socket_interposer.c b/plugins/fault_injection/socket_interposer.c
+index 53c1ebb..ad7adf8 100644
+--- a/plugins/fault_injection/socket_interposer.c
++++ b/plugins/fault_injection/socket_interposer.c
+@@ -100,10 +100,15 @@ socket_interposer_set_callback (struct sockaddr_in *addrin,
+ }
+ 
+ int
+-connect (int socket, const struct sockaddr_in *addrin, socklen_t address_len)
++#if defined(__linux__) && !defined(__GLIBC__)
++connect (int socket, const struct sockaddr *addr, socklen_t address_len)
++#else
++connect (int socket, const struct sockaddr_in *addr, socklen_t address_len)
++#endif
+ {
+   size_t i;
+   int override_errno = 0;
++  struct sockaddr_in* addrin = (struct sockaddr_in*)addr;
+   typedef ssize_t (*real_connect_fn) (int, const struct sockaddr_in *,
+       socklen_t);
+   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 cad64b2..f4438dc 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"
 LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
 
 SRC_URI = "https://gstreamer.freedesktop.org/src/${BPN}/${BP}.tar.xz \
+           file://0001-connect-has-a-different-signature-on-musl.patch \
            "
 SRC_URI[md5sum] = "f334102b0e706008505d00f7f5b5e023"
 SRC_URI[sha256sum] = "ea9e423e5470ef85ef8a0aea1714e7abfc49deb2ed282057367484cdeba6f19f"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list