ARRAY_SIZE dont redefine
authorAndy Green <andy@warmcat.com>
Mon, 6 Jun 2016 12:34:33 +0000 (20:34 +0800)
committerAndy Green <andy@warmcat.com>
Mon, 6 Jun 2016 12:34:33 +0000 (20:34 +0800)
Signed-off-by: Andy Green <andy@warmcat.com>
lib/libwebsockets.h

index 0affce07d14bb2f3626fd05ca98e7d8f6aab9fe2..328c7c27507875dabd4f0d220000c673d747ff79 100644 (file)
@@ -311,7 +311,9 @@ LWS_VISIBLE LWS_EXTERN void lwsl_hexdump(void *buf, size_t len);
 
 
 struct lws;
+#ifndef ARRAY_SIZE
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
+#endif
 
 /* api change list for user code to test against */