diff options
| author | Armin Kuster <akuster808@gmail.com> | 2017-03-14 22:59:36 -0700 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2017-03-27 14:57:26 -0700 |
| commit | 6714e7672fe38e97f68e5ac613aa0a69589b3f97 (patch) | |
| tree | 8253bbe9b73b69377828ecf7008809627cc36b1e | |
| parent | 6c9a5826f0feb135cea67152ef6088d44bddce98 (diff) | |
| download | meta-security-6714e7672fe38e97f68e5ac613aa0a69589b3f97.tar.gz | |
swtpm: fix musl build issues
add two fixes for musl build issues.
also update to latest tip
Signed-off-by: Armin Kuster <akuster808@gmail.com>
| -rw-r--r-- | recipes-tpm/swtpm/files/fix_fcntl_h.patch | 21 | ||||
| -rw-r--r-- | recipes-tpm/swtpm/files/ioctl_h.patch | 22 | ||||
| -rw-r--r-- | recipes-tpm/swtpm/swtpm_1.0.bb | 4 |
3 files changed, 46 insertions, 1 deletions
diff --git a/recipes-tpm/swtpm/files/fix_fcntl_h.patch b/recipes-tpm/swtpm/files/fix_fcntl_h.patch new file mode 100644 index 0000000..e844045 --- /dev/null +++ b/recipes-tpm/swtpm/files/fix_fcntl_h.patch | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | logging: Fix musl build issue with fcntl | ||
| 2 | |||
| 3 | error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp] | ||
| 4 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl. | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
| 8 | |||
| 9 | Index: git/src/swtpm/logging.c | ||
| 10 | =================================================================== | ||
| 11 | --- git.orig/src/swtpm/logging.c | ||
| 12 | +++ git/src/swtpm/logging.c | ||
| 13 | @@ -43,7 +43,7 @@ | ||
| 14 | #include <errno.h> | ||
| 15 | #include <string.h> | ||
| 16 | #include <sys/types.h> | ||
| 17 | -#include <sys/fcntl.h> | ||
| 18 | +#include <fcntl.h> | ||
| 19 | #include <stdio.h> | ||
| 20 | #include <stdlib.h> | ||
| 21 | #include <stdarg.h> | ||
diff --git a/recipes-tpm/swtpm/files/ioctl_h.patch b/recipes-tpm/swtpm/files/ioctl_h.patch new file mode 100644 index 0000000..d736bc6 --- /dev/null +++ b/recipes-tpm/swtpm/files/ioctl_h.patch | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | tpm_ioctl: fix musl for missing ioctl | ||
| 2 | |||
| 3 | tpm_ioctl.c: In function 'ioctl_to_cmd': | ||
| 4 | tpm_ioctl.c:86:26: error: '_IOC_NRSHIFT' undeclared (first use in this function) | ||
| 5 | return ((ioctlnum >> _IOC_NRSHIFT) & _IOC_NRMASK) + 1; | ||
| 6 | |||
| 7 | |||
| 8 | Upstream-status: | ||
| 9 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
| 10 | |||
| 11 | Index: git/src/swtpm_ioctl/tpm_ioctl.c | ||
| 12 | =================================================================== | ||
| 13 | --- git.orig/src/swtpm_ioctl/tpm_ioctl.c | ||
| 14 | +++ git/src/swtpm_ioctl/tpm_ioctl.c | ||
| 15 | @@ -58,6 +58,7 @@ | ||
| 16 | #include <fcntl.h> | ||
| 17 | #include <unistd.h> | ||
| 18 | #include <sys/ioctl.h> | ||
| 19 | +#include <asm/ioctl.h> | ||
| 20 | #include <getopt.h> | ||
| 21 | #include <sys/un.h> | ||
| 22 | #include <sys/types.h> | ||
diff --git a/recipes-tpm/swtpm/swtpm_1.0.bb b/recipes-tpm/swtpm/swtpm_1.0.bb index 7b9662a..99c6fdc 100644 --- a/recipes-tpm/swtpm/swtpm_1.0.bb +++ b/recipes-tpm/swtpm/swtpm_1.0.bb | |||
| @@ -10,11 +10,13 @@ DEPENDS = "libtasn1 fuse expect socat glib-2.0 libtpm libtpm-native" | |||
| 10 | DEPENDS += "tpm-tools-native expect-native socat-native" | 10 | DEPENDS += "tpm-tools-native expect-native socat-native" |
| 11 | RDEPENDS_${PN} += "tpm-tools" | 11 | RDEPENDS_${PN} += "tpm-tools" |
| 12 | 12 | ||
| 13 | SRCREV = "65d8e4d83447f4c13a41a6f995bd0490f49bc5ef" | 13 | SRCREV = "d7bbe3de5cc58c1dca41149df89cfdc08019a722" |
| 14 | SRC_URI = " \ | 14 | SRC_URI = " \ |
| 15 | git://github.com/stefanberger/swtpm.git \ | 15 | git://github.com/stefanberger/swtpm.git \ |
| 16 | file://fix_signed_issue.patch \ | 16 | file://fix_signed_issue.patch \ |
| 17 | file://fix_lib_search_path.patch \ | 17 | file://fix_lib_search_path.patch \ |
| 18 | file://fix_fcntl_h.patch \ | ||
| 19 | file://ioctl_h.patch \ | ||
| 18 | " | 20 | " |
| 19 | 21 | ||
| 20 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
