diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2023-03-16 09:59:39 +0100 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2023-03-16 09:59:39 +0100 |
commit | cda68dfc930facf45fe2a904ecf0f12bf46b21c2 (patch) | |
tree | 94c627cf03b9fe5407631cc237b1aa85cc6f5d7e | |
parent | 7e53c03b0ada19a8f95b695e6963de87d20ba2f3 (diff) |
Fix compilation error
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r-- | src/lib/commands.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/commands.c b/src/lib/commands.c index 73d4d4e..f57db6d 100644 --- a/src/lib/commands.c +++ b/src/lib/commands.c @@ -9,6 +9,10 @@ #include <thermal.h> #include "thermal_nl.h" +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(__array) (sizeof(__array) / sizeof(__array[0])) +#endif + static struct nla_policy thermal_genl_policy[THERMAL_GENL_ATTR_MAX + 1] = { /* Thermal zone */ [THERMAL_GENL_ATTR_TZ] = { .type = NLA_NESTED }, |