diff options
Diffstat (limited to 'recipes-ids/samhain/files/0010-Fix-initializer-element-is-not-constant.patch')
-rw-r--r-- | recipes-ids/samhain/files/0010-Fix-initializer-element-is-not-constant.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/recipes-ids/samhain/files/0010-Fix-initializer-element-is-not-constant.patch b/recipes-ids/samhain/files/0010-Fix-initializer-element-is-not-constant.patch new file mode 100644 index 0000000..8479165 --- /dev/null +++ b/recipes-ids/samhain/files/0010-Fix-initializer-element-is-not-constant.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 77d55c4707395b76e32e07bf0f679b5b6999d568 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kai Kang <kai.kang@windriver.com> | ||
3 | Date: Thu, 27 Mar 2025 11:43:40 +0800 | ||
4 | Subject: [PATCH] Fix initializer element is not constant | ||
5 | |||
6 | Fix error when compile for powerpc: | ||
7 | |||
8 | | x_sh_dbIO.c: In function 'swap_short': | ||
9 | | x_sh_dbIO.c:229:36: error: initializer element is not constant | ||
10 | | 229 | static unsigned short ooop = *iptr; | ||
11 | | | ^ | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | |||
15 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
16 | --- | ||
17 | src/sh_dbIO.c | 3 ++- | ||
18 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/src/sh_dbIO.c b/src/sh_dbIO.c | ||
21 | index 1f9b152..503456d 100644 | ||
22 | --- a/src/sh_dbIO.c | ||
23 | +++ b/src/sh_dbIO.c | ||
24 | @@ -226,7 +226,8 @@ static unsigned short * swap_short (unsigned short * iptr) | ||
25 | else | ||
26 | { | ||
27 | /* alignment problem */ | ||
28 | - static unsigned short ooop = *iptr; | ||
29 | + static unsigned short ooop; | ||
30 | + ooop = *iptr; | ||
31 | unsigned short hi = (ooop & 0xff00); | ||
32 | unsigned short lo = (ooop & 0xff); | ||
33 | ooop = (lo << 8) | (hi >> 8); | ||
34 | -- | ||
35 | 2.34.1 | ||
36 | |||