utils: move ARRAY_SIZE from uloop to utils.h

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
Felix Fietkau 2012-12-31 15:02:31 +01:00
parent d03a6a27c7
commit 9c8ab5d64c
2 changed files with 5 additions and 4 deletions

View file

@ -32,6 +32,7 @@
#include <stdbool.h> #include <stdbool.h>
#include "uloop.h" #include "uloop.h"
#include "utils.h"
#ifdef USE_KQUEUE #ifdef USE_KQUEUE
#include <sys/event.h> #include <sys/event.h>
@ -41,10 +42,6 @@
#endif #endif
#include <sys/wait.h> #include <sys/wait.h>
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
#endif
#define ULOOP_MAX_EVENTS 10 #define ULOOP_MAX_EVENTS 10
static struct list_head timeouts = LIST_HEAD_INIT(timeouts); static struct list_head timeouts = LIST_HEAD_INIT(timeouts);

View file

@ -34,4 +34,8 @@
void *__calloc_a(size_t len, ...); void *__calloc_a(size_t len, ...);
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
#endif
#endif #endif