From 6714e7672fe38e97f68e5ac613aa0a69589b3f97 Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Tue, 14 Mar 2017 22:59:36 -0700 Subject: swtpm: fix musl build issues add two fixes for musl build issues. also update to latest tip Signed-off-by: Armin Kuster --- recipes-tpm/swtpm/files/fix_fcntl_h.patch | 21 +++++++++++++++++++++ recipes-tpm/swtpm/files/ioctl_h.patch | 22 ++++++++++++++++++++++ recipes-tpm/swtpm/swtpm_1.0.bb | 4 +++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 recipes-tpm/swtpm/files/fix_fcntl_h.patch create mode 100644 recipes-tpm/swtpm/files/ioctl_h.patch 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 @@ +logging: Fix musl build issue with fcntl + + error: #warning redirecting incorrect #include to [-Werror=cpp] + #warning redirecting incorrect #include to + +Index: git/src/swtpm/logging.c +=================================================================== +--- git.orig/src/swtpm/logging.c ++++ git/src/swtpm/logging.c +@@ -43,7 +43,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include 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 @@ +tpm_ioctl: fix musl for missing ioctl + +tpm_ioctl.c: In function 'ioctl_to_cmd': +tpm_ioctl.c:86:26: error: '_IOC_NRSHIFT' undeclared (first use in this function) + return ((ioctlnum >> _IOC_NRSHIFT) & _IOC_NRMASK) + 1; + + +Upstream-status: +Signed-off-by: Armin Kuster + +Index: git/src/swtpm_ioctl/tpm_ioctl.c +=================================================================== +--- git.orig/src/swtpm_ioctl/tpm_ioctl.c ++++ git/src/swtpm_ioctl/tpm_ioctl.c +@@ -58,6 +58,7 @@ + #include + #include + #include ++#include + #include + #include + #include 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" DEPENDS += "tpm-tools-native expect-native socat-native" RDEPENDS_${PN} += "tpm-tools" -SRCREV = "65d8e4d83447f4c13a41a6f995bd0490f49bc5ef" +SRCREV = "d7bbe3de5cc58c1dca41149df89cfdc08019a722" SRC_URI = " \ git://github.com/stefanberger/swtpm.git \ file://fix_signed_issue.patch \ file://fix_lib_search_path.patch \ + file://fix_fcntl_h.patch \ + file://ioctl_h.patch \ " S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf