mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00
kvmtool: fix compilation errors
Fixed issues: Usage of makedev requires including <sys/sysmacros.h> otherwise the error is raised due to multiple definition in <sys/types.h>. Add include path to kernel headers required to get kvmtool compilatioin successful. Signed-off-by: Dariusz Pelowski <dariusz.pelowski@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
parent
71dc7faa0c
commit
8cc50eae10
|
@ -0,0 +1,27 @@
|
||||||
|
From bcd954ffdb9383030e02d356b51e09e4e2a7105a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dariusz Pelowski <dariusz.pelowski@gmail.com>
|
||||||
|
Date: Sun, 5 Nov 2017 12:39:52 +0100
|
||||||
|
Subject: [PATCH 1/2] kvmtool: 9p: fixed compilation error
|
||||||
|
|
||||||
|
makedev is defined in sys/sysmacros.h
|
||||||
|
|
||||||
|
Signed-off-by: Dariusz Pelowski <dariusz.pelowski@gmail.com>
|
||||||
|
---
|
||||||
|
virtio/9p.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/virtio/9p.c b/virtio/9p.c
|
||||||
|
index 6acbfdd..1dee2c2 100644
|
||||||
|
--- a/virtio/9p.c
|
||||||
|
+++ b/virtio/9p.c
|
||||||
|
@@ -15,6 +15,7 @@
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <sys/vfs.h>
|
||||||
|
+#include <sys/sysmacros.h>
|
||||||
|
|
||||||
|
#include <linux/virtio_ring.h>
|
||||||
|
#include <linux/virtio_9p.h>
|
||||||
|
--
|
||||||
|
2.15.0
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
From 977a4d41012d1814f5a5330cacc2e4944de387cc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dariusz Pelowski <dariusz.pelowski@gmail.com>
|
||||||
|
Date: Sun, 5 Nov 2017 12:39:21 +0100
|
||||||
|
Subject: [PATCH 2/2] kvmtool: add EXTRA_CFLAGS variable
|
||||||
|
|
||||||
|
to avoid CFLAGS overriding introduce new EXTRA_CFLAGS variable
|
||||||
|
for setting via command argument
|
||||||
|
|
||||||
|
Signed-off-by: Dariusz Pelowski <dariusz.pelowski@gmail.com>
|
||||||
|
---
|
||||||
|
Makefile | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 64a0a16..bca1b26 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -2,6 +2,8 @@
|
||||||
|
# Define WERROR=0 to disable -Werror.
|
||||||
|
#
|
||||||
|
|
||||||
|
+CFLAGS += $(EXTRA_CFLAGS)
|
||||||
|
+
|
||||||
|
ifeq ($(strip $(V)),)
|
||||||
|
E = @echo
|
||||||
|
Q = @
|
||||||
|
--
|
||||||
|
2.15.0
|
||||||
|
|
|
@ -5,10 +5,15 @@ LICENSE = "GPLv2"
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
|
LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
|
||||||
|
|
||||||
DEPENDS = "dtc libaio zlib"
|
DEPENDS = "dtc libaio zlib"
|
||||||
|
do_configure[depends] += "virtual/kernel:do_shared_workdir"
|
||||||
|
|
||||||
|
inherit kernel-arch
|
||||||
|
|
||||||
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git \
|
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git \
|
||||||
file://external-crosscompiler.patch \
|
file://external-crosscompiler.patch \
|
||||||
file://0001-Avoid-pointers-for-address-of-packed-members.patch \
|
file://0001-Avoid-pointers-for-address-of-packed-members.patch \
|
||||||
|
file://0001-kvmtool-9p-fixed-compilation-error.patch \
|
||||||
|
file://0002-kvmtool-add-EXTRA_CFLAGS-variable.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRCREV = "3fea89a924511f9f8fe05a892098fad77c1eca0d"
|
SRCREV = "3fea89a924511f9f8fe05a892098fad77c1eca0d"
|
||||||
|
@ -16,7 +21,7 @@ PV = "3.18.0+git${SRCREV}"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
EXTRA_OEMAKE='ARCH="${TARGET_ARCH}" V=1'
|
EXTRA_OEMAKE='V=1 EXTRA_CFLAGS="-I${STAGING_KERNEL_DIR}/arch/${ARCH}/include -I${STAGING_KERNEL_BUILDDIR}/arch/${ARCH}/include/generated/"'
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -d ${D}${bindir}
|
install -d ${D}${bindir}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user