From 76ec318118106cb25d762de83857f6579c13e273 Mon Sep 17 00:00:00 2001
From: Uros Majstorovic <majstor@majstor.org>
Date: Fri, 27 Aug 2021 03:06:13 +0200
Subject: yocto rename

---
 ecp/src/core.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'ecp/src')

diff --git a/ecp/src/core.c b/ecp/src/core.c
index ae5eca1..ecec401 100644
--- a/ecp/src/core.c
+++ b/ecp/src/core.c
@@ -1787,9 +1787,16 @@ int ecp_receiver(ECPSocket *sock) {
     return ECP_OK;
 }
 
+#ifdef ECP_WITH_PTHREAD
+static void *_ecp_receiver(void *arg) {
+    ecp_receiver((ECPSocket *)arg);
+    pthread_exit(NULL);
+}
+#endif
+
 int ecp_start_receiver(ECPSocket *sock) {
 #ifdef ECP_WITH_PTHREAD
-    int rv = pthread_create(&sock->rcvr_thd, NULL, (void *(*)(void *))ecp_receiver, sock);
+    int rv = pthread_create(&sock->rcvr_thd, NULL, _ecp_receiver, sock);
     if (rv) return ECP_ERR;
     return ECP_OK;
 #else
-- 
cgit v1.2.3