aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>2015-12-30 14:00:55 +0530
committerMartin Jansa <Martin.Jansa@gmail.com>2016-01-14 11:22:10 +0100
commit6b853623c63ef4c2cce7d5dcc28b2998a459f0e6 (patch)
tree94c501a0055aa98d028a107c55c25f1f4eced6d6
parent967978d55af658e9173f9dd9b127f3a248a6da88 (diff)
downloadmeta-openembedded-contrib-6b853623c63ef4c2cce7d5dcc28b2998a459f0e6.tar.gz
meta-openembedded-contrib-6b853623c63ef4c2cce7d5dcc28b2998a459f0e6.tar.bz2
meta-openembedded-contrib-6b853623c63ef4c2cce7d5dcc28b2998a459f0e6.zip
iscsitarget: resolve build error if CONFIG_IPV6 config is not enabled
The element skc_v6_daddr (in struct sock_common) is defined in kernel source only when CONFIG_IPV6 is enabled. Hence, access sk_v6_daddr element (i.e __sk_common.skc_v6_daddr) only when CONFIG_IPV6 is defined; to fix below error in world build: -- snip -- /home/jenkins/oe/world/shr-core/tmp-glibc/work-shared/qemux86/kernel-source/include/net/sock.h:330:33: error: 'struct sock_common' has no member named 'skc_v6_daddr' -- CUT -- Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-networking/recipes-extended/iscsitarget/files/access-sk_v6_daddr-iff-IPV6-defined.patch28
-rw-r--r--meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb1
2 files changed, 29 insertions, 0 deletions
diff --git a/meta-networking/recipes-extended/iscsitarget/files/access-sk_v6_daddr-iff-IPV6-defined.patch b/meta-networking/recipes-extended/iscsitarget/files/access-sk_v6_daddr-iff-IPV6-defined.patch
new file mode 100644
index 0000000000..4444234b2e
--- /dev/null
+++ b/meta-networking/recipes-extended/iscsitarget/files/access-sk_v6_daddr-iff-IPV6-defined.patch
@@ -0,0 +1,28 @@
+The element skc_v6_daddr (in struct sock_common) is defined in
+kernel source only when CONFIG_IPV6 is enabled. Hence, access
+sk_v6_daddr element (i.e __sk_common.skc_v6_daddr) only when CONFIG_IPV6
+is defined; to fix below error in world build:
+
+-- snip --
+/home/jenkins/oe/world/shr-core/tmp-glibc/work-shared/qemux86/kernel-source/include/net/sock.h:330:33: error: 'struct sock_common' has no member named 'skc_v6_daddr'
+-- CUT --
+
+Upstream-Status: Pending
+
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+
+--- iscsitarget-1.4.20.3+svn502_org/kernel/conn.c 2015-12-29 21:57:50.547932217 -0800
++++ iscsitarget-1.4.20.3+svn502/kernel/conn.c 2015-12-29 22:47:25.254657627 -0800
+@@ -46,10 +46,12 @@ void conn_info_show(struct seq_file *seq
+ snprintf(buf, sizeof(buf),
+ "%pI4", &inet_sk(sk)->inet_daddr);
+ break;
++#if defined(CONFIG_IPV6)
+ case AF_INET6:
+ snprintf(buf, sizeof(buf), "[%pI6]",
+ &(sk)->sk_v6_daddr);
+ break;
++#endif /* defined(CONFIG_IPV6) */
+ default:
+ break;
+ }
diff --git a/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb b/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb
index c96810b21c..b327f8649e 100644
--- a/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb
+++ b/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb
@@ -11,6 +11,7 @@ DEPENDS = "openssl virtual/kernel"
SRC_URI = "http://ftp.heanet.ie/mirrors/ubuntu/pool/universe/i/${BPN}/${BPN}_${PV}.orig.tar.gz \
file://use-kernel-makefile-to-get-kernel-version.patch \
file://fix-errors-observed-with-linux-3.19-and-greater.patch \
+ file://access-sk_v6_daddr-iff-IPV6-defined.patch \
"
SRC_URI[md5sum] = "ef9bc823bbabd3c772208c00d5f2d089"
SRC_URI[sha256sum] = "d3196ccb78a43266dce28587bfe30d8ab4db7566d7bce96057dfbb84100babb5"