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>
This commit is contained in:
Armin Kuster
2017-03-14 22:59:36 -07:00
parent 6c9a5826f0
commit 6714e7672f
3 changed files with 46 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
logging: Fix musl build issue with fcntl
error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
#warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.
Upstream-Status: Pending
Signed-off-by: Armin Kuster <akuster@mvista.com>
Index: git/src/swtpm/logging.c
===================================================================
--- git.orig/src/swtpm/logging.c
+++ git/src/swtpm/logging.c
@@ -43,7 +43,7 @@
#include <errno.h>
#include <string.h>
#include <sys/types.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
+22
View File
@@ -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 <akuster@mvista.com>
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 <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
+#include <asm/ioctl.h>
#include <getopt.h>
#include <sys/un.h>
#include <sys/types.h>
+3 -1
View File
@@ -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"