summaryrefslogtreecommitdiff
path: root/ecp
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2021-08-27 03:06:13 +0200
committerUros Majstorovic <majstor@majstor.org>2021-08-27 03:06:13 +0200
commit76ec318118106cb25d762de83857f6579c13e273 (patch)
treeac1025b9e79a5eae04b6036d56599c0df98dcb08 /ecp
parent6d270f43cfea8e840463c260b43a6afbd24c1149 (diff)
yocto rename
Diffstat (limited to 'ecp')
-rw-r--r--ecp/src/core.c9
1 files changed, 8 insertions, 1 deletions
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