From 6cdc5195ecc0bce8d922c1061799b20aec8f2216 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 23 Apr 2023 08:54:23 +0100 Subject: [PATCH] eloop: define __arraycount if not defined by the OS --- src/eloop.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/eloop.c b/src/eloop.c index 0af001ba..32a90c77 100644 --- a/src/eloop.c +++ b/src/eloop.c @@ -153,6 +153,10 @@ #include #endif +#ifndef __arraycount +# define __arraycount(__x) (sizeof(__x) / sizeof(__x[0])) +#endif + /* * Allow a backlog of signals. * If you use many eloops in the same process, they should all -- 2.47.2