From: Mathieu Desnoyers Date: Sat, 5 Nov 2022 15:37:10 +0000 (-0400) Subject: Fix g++ build X-Git-Url: http://git.efficios.com/?p=libside.git;a=commitdiff_plain;h=a9cd3a90fecf32fbe8bfb09e477ec667cc535fda Fix g++ build Signed-off-by: Mathieu Desnoyers --- diff --git a/src/rcu.c b/src/rcu.c index 2e8be1c..1fd1af2 100644 --- a/src/rcu.c +++ b/src/rcu.c @@ -286,7 +286,8 @@ void side_rcu_gp_init(struct side_rcu_gp_state *rcu_gp) if (!rcu_gp->nr_cpus) abort(); pthread_mutex_init(&rcu_gp->gp_lock, NULL); - rcu_gp->percpu_state = calloc(rcu_gp->nr_cpus, sizeof(struct side_rcu_cpu_gp_state)); + rcu_gp->percpu_state = (struct side_rcu_cpu_gp_state *) + calloc(rcu_gp->nr_cpus, sizeof(struct side_rcu_cpu_gp_state)); if (!rcu_gp->percpu_state) abort(); if (!membarrier(MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED, 0, 0))