summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2023-03-15 20:06:26 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2023-03-15 20:06:26 +0100
commitda749c1bcb38853034c9a4ce7a8feb44d1ae167b (patch)
tree859d2b171ba2ec80b942bad458fa69260d0c81b5
parent667e45c3db9872004ed4b4b77170c816afde97cd (diff)
More import
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--.gitignore3
-rw-r--r--patches/array_size_macro.patch15
-rw-r--r--patches/patches.list1
-rwxr-xr-xsync.sh4
4 files changed, 21 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 361400d..fa81e34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
*.o
*~
.linux
+src/dtpm/dtpm
+*.a
+*.so
diff --git a/patches/array_size_macro.patch b/patches/array_size_macro.patch
new file mode 100644
index 0000000..3b9b59d
--- /dev/null
+++ b/patches/array_size_macro.patch
@@ -0,0 +1,15 @@
+diff --git a/src/lib/commands.c b/src/lib/commands.c
+index 73d4d4e8d6ec..f57db6d07615 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 },
diff --git a/patches/patches.list b/patches/patches.list
new file mode 100644
index 0000000..6f28588
--- /dev/null
+++ b/patches/patches.list
@@ -0,0 +1 @@
+array_size_macro.patch
diff --git a/sync.sh b/sync.sh
index 3a264d9..6ac5510 100755
--- a/sync.sh
+++ b/sync.sh
@@ -47,8 +47,8 @@ for TARGET in ${!TARGETS[@]}; do
done
echo " * Patching source files"
-for PATCH in $(ls patches/*.patch 2> /dev/null); do
- patch -p1 < $PATCH
+for PATCH in $(cat patches/patches.list); do
+ patch -p1 < patches/$PATCH
done
echo "Done"