diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2019-02-28 13:58:24 +0000 |
---|---|---|
committer | Jia Zhang <zhang.jia@linux.alibaba.com> | 2019-02-28 22:58:37 +0800 |
commit | 45637891f7376a8ad542a5cfd250be415b3fa6a4 (patch) | |
tree | 4cb428692a3397aabfa253941c2643fbc17992cc | |
parent | 8dc50571611ea088c69070942d9ca3f129911678 (diff) | |
download | meta-secure-core-45637891f7376a8ad542a5cfd250be415b3fa6a4.tar.gz |
Patch ima-evm-utils to fix build with musl
Third party programs including libimaevm fails to build with musl
due to a missing include in the public header. Add it.
The build with glibc is unaffected. Patch sent upstream.
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
2 files changed, 38 insertions, 0 deletions
diff --git a/meta-integrity/recipes-support/ima-evm-utils/ima-evm-utils/0001-ima-evm-utils-include-sys-types.h-in-header-to-fix-b.patch b/meta-integrity/recipes-support/ima-evm-utils/ima-evm-utils/0001-ima-evm-utils-include-sys-types.h-in-header-to-fix-b.patch new file mode 100644 index 0000000..49a8d94 --- /dev/null +++ b/meta-integrity/recipes-support/ima-evm-utils/ima-evm-utils/0001-ima-evm-utils-include-sys-types.h-in-header-to-fix-b.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From d6d021947a0e5ceeca182e8716b51eb8e02c0744 Mon Sep 17 00:00:00 2001 | ||
2 | From: Luca Boccassi <luca.boccassi@microsoft.com> | ||
3 | Date: Tue, 26 Feb 2019 14:57:10 +0000 | ||
4 | Subject: [PATCH] Include sys/types.h in header to fix build with musl | ||
5 | |||
6 | Building a third program that depends on libimaevm with musl fails, as | ||
7 | the imaevm.h uses uid_t and gid_t without including sys/types.h: | ||
8 | |||
9 | <..>/sysroot/usr/include/imaevm.h:90:2: error: unknown type name 'uid_t' | ||
10 | uid_t uid; | ||
11 | |||
12 | Including sys/types.h fixes building with musl and does not affect | ||
13 | building with glibc. | ||
14 | |||
15 | Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | ||
16 | --- | ||
17 | Applied-Upstream: no | ||
18 | Forwarded: https://patchwork.kernel.org/patch/10830643/ | ||
19 | |||
20 | src/imaevm.h | 1 + | ||
21 | 1 file changed, 1 insertion(+) | ||
22 | |||
23 | diff --git a/src/imaevm.h b/src/imaevm.h | ||
24 | index 795966a..d85db0d 100644 | ||
25 | --- a/src/imaevm.h | ||
26 | +++ b/src/imaevm.h | ||
27 | @@ -44,6 +44,7 @@ | ||
28 | #include <linux/fs.h> | ||
29 | #include <stdint.h> | ||
30 | #include <syslog.h> | ||
31 | +#include <sys/types.h> | ||
32 | #include <stdbool.h> | ||
33 | #include <errno.h> | ||
34 | |||
35 | -- | ||
36 | 2.20.1 | ||
37 | |||
diff --git a/meta-integrity/recipes-support/ima-evm-utils/ima-evm-utils_git.bb b/meta-integrity/recipes-support/ima-evm-utils/ima-evm-utils_git.bb index dbfd7c9..0d0d703 100644 --- a/meta-integrity/recipes-support/ima-evm-utils/ima-evm-utils_git.bb +++ b/meta-integrity/recipes-support/ima-evm-utils/ima-evm-utils_git.bb | |||
@@ -10,6 +10,7 @@ SRC_URI = "\ | |||
10 | file://0001-Don-t-build-man-pages.patch \ | 10 | file://0001-Don-t-build-man-pages.patch \ |
11 | file://0001-Install-evmctl-to-sbindir-rather-than-bindir.patch \ | 11 | file://0001-Install-evmctl-to-sbindir-rather-than-bindir.patch \ |
12 | file://Fix-the-build-failure-with-openssl-1.1.x.patch \ | 12 | file://Fix-the-build-failure-with-openssl-1.1.x.patch \ |
13 | file://0001-ima-evm-utils-include-sys-types.h-in-header-to-fix-b.patch \ | ||
13 | " | 14 | " |
14 | SRCREV = "3e2a67bdb0673581a97506262e62db098efef6d7" | 15 | SRCREV = "3e2a67bdb0673581a97506262e62db098efef6d7" |
15 | 16 | ||