blob: 48cf7a355c9fe82eefd72fb400181cd7364ccdfb [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001From e9e9027d7a324e1ce5e0cb06d4eb51847262a09d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 28 Aug 2022 12:26:52 -0700
4Subject: [PATCH] mplay: Fix build with musl
5
6pthread_t is an opaque type, therefore typecast it to avoid warnings on
7musl
8
9Fixes
10mplay.c:200:12: error: incompatible integer to pointer conversion initializing 'pthread_t' (aka 'struct __pthread *') with an expression of type 'int' [-Wint-conversion]
11| .tid = -1
12| ^~
13
14Upstream-Status: Submitted [https://sourceforge.net/p/lirc/git/merge-requests/47/]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 plugins/mplay.c | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/plugins/mplay.c b/plugins/mplay.c
21index d6d9619..5b9eb4b 100644
22--- a/plugins/mplay.c
23+++ b/plugins/mplay.c
24@@ -197,7 +197,7 @@ static struct {
25 .latest_button = MPLAY_CODE_ERROR,
26 .fd = -1,
27 .pipefd = { -1, -1 },
28- .tid = -1
29+ .tid = (pthread_t)-1
30 };
31
32 /**
33@@ -788,7 +788,7 @@ int mplayfamily_deinit(void)
34 return 0;
35 }
36 pthread_join(mplayfamily_local_data.tid, NULL);
37- mplayfamily_local_data.tid = -1;
38+ mplayfamily_local_data.tid = (pthread_t)-1;
39 }
40 if (mplayfamily_local_data.pipefd[0] != -1) {
41 close(mplayfamily_local_data.pipefd[0]);
42--
432.37.2
44