utils: move ARRAY_SIZE from uloop to utils.h
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
parent
d03a6a27c7
commit
9c8ab5d64c
2 changed files with 5 additions and 4 deletions
5
uloop.c
5
uloop.c
|
@ -32,6 +32,7 @@
|
|||
#include <stdbool.h>
|
||||
|
||||
#include "uloop.h"
|
||||
#include "utils.h"
|
||||
|
||||
#ifdef USE_KQUEUE
|
||||
#include <sys/event.h>
|
||||
|
@ -41,10 +42,6 @@
|
|||
#endif
|
||||
#include <sys/wait.h>
|
||||
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
#endif
|
||||
#define ULOOP_MAX_EVENTS 10
|
||||
|
||||
static struct list_head timeouts = LIST_HEAD_INIT(timeouts);
|
||||
|
|
4
utils.h
4
utils.h
|
@ -34,4 +34,8 @@
|
|||
|
||||
void *__calloc_a(size_t len, ...);
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue