]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
eloop: define __arraycount if not defined by the OS
authorRoy Marples <roy@marples.name>
Sun, 23 Apr 2023 07:54:23 +0000 (08:54 +0100)
committerRoy Marples <roy@marples.name>
Sun, 23 Apr 2023 07:54:23 +0000 (08:54 +0100)
src/eloop.c

index 0af001ba41b470c2ed319ea8c0fbf1e24c643979..32a90c77eee3b878e5a69b9125f9ae802f97effd 100644 (file)
 #include <stdio.h>
 #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