diff mbox series

[meta-oe,18/22] directfb: Fix build with musl+GCC14

Message ID 20240521181024.426176-18-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,01/22] libsdl: Fix build with musl | expand

Commit Message

Khem Raj May 21, 2024, 6:10 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../recipes-graphics/directfb/directfb.inc    |  1 +
 ...rect-the-signature-of-bind-call-on-m.patch | 36 +++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/directfb/directfb/0001-inputdrivers-Correct-the-signature-of-bind-call-on-m.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-graphics/directfb/directfb.inc b/meta-oe/recipes-graphics/directfb/directfb.inc
index 4d38632e25..54aeb06aa9 100644
--- a/meta-oe/recipes-graphics/directfb/directfb.inc
+++ b/meta-oe/recipes-graphics/directfb/directfb.inc
@@ -24,6 +24,7 @@  SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/DirectFB-${PV}.tar.g
            file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
            file://0001-os-linux-Fix-build-when-__NR_futex-is-not-available.patch \
            file://0001-include-libgen.h-for-basename.patch \
+           file://0001-inputdrivers-Correct-the-signature-of-bind-call-on-m.patch \
            "
 
 S = "${WORKDIR}/DirectFB-${PV}"
diff --git a/meta-oe/recipes-graphics/directfb/directfb/0001-inputdrivers-Correct-the-signature-of-bind-call-on-m.patch b/meta-oe/recipes-graphics/directfb/directfb/0001-inputdrivers-Correct-the-signature-of-bind-call-on-m.patch
new file mode 100644
index 0000000000..574bba0bc7
--- /dev/null
+++ b/meta-oe/recipes-graphics/directfb/directfb/0001-inputdrivers-Correct-the-signature-of-bind-call-on-m.patch
@@ -0,0 +1,36 @@ 
+From 18f4eca291cabf93d87e7c9051268d9c385b8f37 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 20 May 2024 18:23:06 -0700
+Subject: [PATCH] inputdrivers: Correct the signature of bind() call on musl
+ systems
+
+Its flagged with GCC14
+
+../../../DirectFB-1.7.7/inputdrivers/linux_input/linux_input.c:1551:27: error: passing argument 2 of 'bind' from incompatible pointer type [-Wincompatible-pointer-types]
+ 1551 |      rt = bind(socket_fd, &sock_addr,
+      |                           ^~~~~~~~~~
+      |                           |
+      |                           struct sockaddr_un *
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ inputdrivers/linux_input/linux_input.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/inputdrivers/linux_input/linux_input.c b/inputdrivers/linux_input/linux_input.c
+index 03deebc..207f5a5 100644
+--- a/inputdrivers/linux_input/linux_input.c
++++ b/inputdrivers/linux_input/linux_input.c
+@@ -1548,7 +1548,7 @@ udev_hotplug_EventThread(DirectThread *thread, void * hotplug_data)
+              "/org/kernel/udev/monitor",
+              sizeof(sock_addr.sun_path) - 1);
+ 
+-     rt = bind(socket_fd, &sock_addr,
++     rt = bind(socket_fd, (struct sockaddr *)&sock_addr,
+                sizeof(sock_addr.sun_family)+1+strlen(&sock_addr.sun_path[1]));
+      if (rt < 0) {
+           D_PERROR( "DirectFB/linux_input: bind() failed: %s\n",
+-- 
+2.45.1
+