From: Józef Kucia jkucia@codeweavers.com
winnt.h from Wine defines ARRAY_SIZE() when __WINESRC__ is defined.
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- include/private/vkd3d_common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/private/vkd3d_common.h b/include/private/vkd3d_common.h index d942acf2b74b..1129f1e3001a 100644 --- a/include/private/vkd3d_common.h +++ b/include/private/vkd3d_common.h @@ -22,7 +22,9 @@ #include "config.h" #include "vkd3d_windows.h"
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) +#ifndef ARRAY_SIZE +# define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) +#endif
#define DIV_ROUND_UP(a, b) ((a) % (b) == 0 ? (a) / (b) : (a) / (b) + 1)