Skip to content

Commit dff2daf

Browse files
committed
eloop: define __arraycount if not defined by the OS
Fixes #2
1 parent 24c1c19 commit dff2daf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/eloop.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@
153153
#include <stdio.h>
154154
#endif
155155

156+
#ifndef __arraycount
157+
# define __arraycount(__x) (sizeof(__x) / sizeof(__x[0]))
158+
#endif
159+
156160
/*
157161
* Allow a backlog of signals.
158162
* If you use many eloops in the same process, they should all

0 commit comments

Comments
 (0)