diff --git a/janus/src/client.h b/janus/src/client.h index 0d8df18..12ea7f8 100644 --- a/janus/src/client.h +++ b/janus/src/client.h @@ -36,7 +36,7 @@ #include "rtpc.h" -typedef struct { +typedef struct us_janus_client_sx { janus_callbacks *gw; janus_plugin_session *session; @@ -66,7 +66,7 @@ typedef struct { ldf last_key_req_ts; - US_LIST_DECLARE; + US_LIST_DECLARE(struct us_janus_client_sx); } us_janus_client_s; diff --git a/src/libs/list.h b/src/libs/list.h index ebae607..8a50e5f 100644 --- a/src/libs/list.h +++ b/src/libs/list.h @@ -25,9 +25,9 @@ #include "tools.h" -#define US_LIST_DECLARE \ - void *prev; \ - void *next; +#define US_LIST_DECLARE(x_type) \ + x_type *prev; \ + x_type *next; #define US_LIST_ITERATE(x_first, x_item, ...) { \ for (__typeof__(x_first) x_item = x_first; x_item;) { \ diff --git a/src/ustreamer/http/server.h b/src/ustreamer/http/server.h index 6bfe9b2..65fa636 100644 --- a/src/ustreamer/http/server.h +++ b/src/ustreamer/http/server.h @@ -36,7 +36,7 @@ #include "../stream.h" -typedef struct { +typedef struct us_stream_client_sx { struct us_server_sx *server; struct evhttp_request *req; @@ -54,15 +54,15 @@ typedef struct { us_fpsi_s *fpsi; - US_LIST_DECLARE; + US_LIST_DECLARE(struct us_stream_client_sx); } us_stream_client_s; -typedef struct { +typedef struct us_snapshot_client_sx { struct us_server_sx *server; struct evhttp_request *req; ldf req_ts; - US_LIST_DECLARE; + US_LIST_DECLARE(struct us_snapshot_client_sx); } us_snapshot_client_s; typedef struct { diff --git a/src/ustreamer/workers.h b/src/ustreamer/workers.h index a856e23..d754899 100644 --- a/src/ustreamer/workers.h +++ b/src/ustreamer/workers.h @@ -47,7 +47,7 @@ typedef struct us_worker_sx { struct us_workers_pool_sx *pool; - US_LIST_DECLARE; + US_LIST_DECLARE(struct us_worker_sx); } us_worker_s; typedef void *(*us_workers_pool_job_init_f)(void *arg);