diff --git a/lib/nodes/rtp.c b/lib/nodes/rtp.c index 5b720c6a9..36e39d345 100644 --- a/lib/nodes/rtp.c +++ b/lib/nodes/rtp.c @@ -465,12 +465,7 @@ int rtp_stop(struct node *n) } return io_destroy(&r->io); -} -static void * th_func(void *arg) -{ - re_main(NULL); - return NULL; } static void stop_handler(int sig, siginfo_t *si, void *ctx) @@ -478,6 +473,8 @@ static void stop_handler(int sig, siginfo_t *si, void *ctx) re_cancel(); } +typedef void *(*pthread_start_routine)(void *); + int rtp_type_start(struct super_node *sn) { int ret; @@ -490,7 +487,7 @@ int rtp_type_start(struct super_node *sn) } /* Add worker thread */ - ret = pthread_create(&re_pthread, NULL, th_func, NULL); + ret = pthread_create(&re_pthread, NULL, (pthread_start_routine) re_main, NULL); if (ret) { warning("Error creating rtp node type pthread"); return ret;