You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2019/02/15 10:14:38 UTC
[mynewt-nimble] branch master updated: nimble/mesh: Do not redefine
ARRAY_SIZE
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new 6f41813 nimble/mesh: Do not redefine ARRAY_SIZE
6f41813 is described below
commit 6f4181359266ec47587d86146eebd193684dd42d
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Fri Feb 15 11:04:03 2019 +0100
nimble/mesh: Do not redefine ARRAY_SIZE
os/util.h has it now, but it may still be needed for ports.
---
nimble/host/mesh/include/mesh/glue.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/nimble/host/mesh/include/mesh/glue.h b/nimble/host/mesh/include/mesh/glue.h
index e4297b6..09c64e1 100644
--- a/nimble/host/mesh/include/mesh/glue.h
+++ b/nimble/host/mesh/include/mesh/glue.h
@@ -127,7 +127,10 @@ extern "C" {
#define sys_be16_to_cpu(a) be16toh(a)
#define sys_le16_to_cpu(a) le16toh(a)
+#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#endif
+
#define CODE_UNREACHABLE __builtin_unreachable()
#define __ASSERT(code, str) \
do { \