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"