diff mbox series

[meta-oe,43/63] directfb-examples: Fix pthread_t assignment type

Message ID 20220904073417.3251865-43-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,01/63] libutempter: Upgrade to 1.2.2-alt1 | expand

Commit Message

Khem Raj Sept. 4, 2022, 7:33 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-typecast-to-pthread_t-in-assignment.patch | 39 +++++++++++++++++++
 .../directfb/directfb-examples_1.7.0.bb       |  1 +
 2 files changed, 40 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/directfb/directfb-examples/0001-spacedream-Add-typecast-to-pthread_t-in-assignment.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-graphics/directfb/directfb-examples/0001-spacedream-Add-typecast-to-pthread_t-in-assignment.patch b/meta-oe/recipes-graphics/directfb/directfb-examples/0001-spacedream-Add-typecast-to-pthread_t-in-assignment.patch
new file mode 100644
index 0000000000..f40b7f144d
--- /dev/null
+++ b/meta-oe/recipes-graphics/directfb/directfb-examples/0001-spacedream-Add-typecast-to-pthread_t-in-assignment.patch
@@ -0,0 +1,39 @@ 
+From 85a30903ea3ba4232379bbbcb54960307d5a2da0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Sep 2022 18:49:03 -0700
+Subject: [PATCH] spacedream: Add typecast to pthread_t in assignment
+
+render_loop_thread is of type pthread_t, therefore -1 which is int can
+not be assigned to it. Do the needed typecast conversion
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/spacedream/main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/spacedream/main.c b/src/spacedream/main.c
+index 430800f..8e1887c 100644
+--- a/src/spacedream/main.c
++++ b/src/spacedream/main.c
+@@ -205,7 +205,7 @@ void unload_stars()
+ int main( int argc, char *argv[] )
+ {
+      int                   quit = 0;
+-     pthread_t             render_loop_thread = -1;
++     pthread_t             render_loop_thread = (pthread_t)-1;
+ 
+      IDirectFBSurface     *primary;
+      IDirectFBEventBuffer *buffer;
+@@ -344,7 +344,7 @@ int main( int argc, char *argv[] )
+      pthread_cancel( render_loop_thread );
+      pthread_mutex_unlock( &render_start );
+      pthread_join( render_loop_thread, NULL );
+-     render_loop_thread = -1;
++     render_loop_thread = (pthread_t)-1;
+ 
+ 
+      unload_stars();
+-- 
+2.37.3
+
diff --git a/meta-oe/recipes-graphics/directfb/directfb-examples_1.7.0.bb b/meta-oe/recipes-graphics/directfb/directfb-examples_1.7.0.bb
index 7907c5c0da..398e339482 100644
--- a/meta-oe/recipes-graphics/directfb/directfb-examples_1.7.0.bb
+++ b/meta-oe/recipes-graphics/directfb/directfb-examples_1.7.0.bb
@@ -9,6 +9,7 @@  LICENSE = "MIT"
 SRC_URI = " \
            http://downloads.yoctoproject.org/mirror/sources/DirectFB-examples-${PV}.tar.gz \
            file://configure.in-Fix-string-argument-syntax.patch \
+           file://0001-spacedream-Add-typecast-to-pthread_t-in-assignment.patch \
           "
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=ecf6fd2b19915afc4da56043926ca18f"