Commit 92dce91a authored by Laurent's avatar Laurent

reallocarray() doesn't exist in old Ubuntu

parent 47794185
...@@ -340,7 +340,7 @@ extern "C" { ...@@ -340,7 +340,7 @@ extern "C" {
pthread_mutex_lock (&lock_nb_queues); pthread_mutex_lock (&lock_nb_queues);
int newQueue=nb_queues; int newQueue=nb_queues;
nb_queues++; nb_queues++;
AssertFatal(reallocarray(tasks, nb_queues, sizeof(*tasks)),"no memory"); AssertFatal(realloc(tasks, nb_queues* sizeof(*tasks)),"no memory");
pthread_mutex_unlock (&lock_nb_queues); pthread_mutex_unlock (&lock_nb_queues);
LOG_I(TMR,"Starting itti queue: %s as task %d\n", tasks_info->name, newQueue); LOG_I(TMR,"Starting itti queue: %s as task %d\n", tasks_info->name, newQueue);
pthread_mutex_init(&tasks[newQueue].queue_cond_lock, NULL); pthread_mutex_init(&tasks[newQueue].queue_cond_lock, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment