summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-03-12 04:40:51 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-15 22:47:53 (GMT)
commite48e13e1cd0cce46723761bfd807cd0c0cfd44ef (patch)
tree35ce96e749e9334dfafe0973a7e9e0e082d90157
parent283aca3918d9859292a5dbf27473f6f0a2b90afe (diff)
downloadpoky-e48e13e1cd0cce46723761bfd807cd0c0cfd44ef.tar.gz
unfs3: Fix build with musl
Should also fix build on new build hosts where with glibc 2.27 rpc support is dropped in favor of libtirpc (From OE-Core rev: f5992ee01fca27d5fdfb9108f436adfcb49f1ae7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/distro/include/world-broken.inc5
-rw-r--r--meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch37
-rw-r--r--meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb10
3 files changed, 44 insertions, 8 deletions
diff --git a/meta/conf/distro/include/world-broken.inc b/meta/conf/distro/include/world-broken.inc
index d4bdddf..0166963 100644
--- a/meta/conf/distro/include/world-broken.inc
+++ b/meta/conf/distro/include/world-broken.inc
@@ -5,11 +5,6 @@
5# rt-tests needs PI mutex support in libc 5# rt-tests needs PI mutex support in libc
6EXCLUDE_FROM_WORLD_pn-rt-tests_libc-musl = "1" 6EXCLUDE_FROM_WORLD_pn-rt-tests_libc-musl = "1"
7 7
8# error: no member named 'sin_port' in 'struct sockaddr_in6'
9# this is due to libtirpc using ipv6 but portmap rpc expecting ipv4
10EXCLUDE_FROM_WORLD_pn-portmap_libc-musl = "1"
11EXCLUDE_FROM_WORLD_pn-unfs3_libc-musl = "1"
12
13# error: use of undeclared identifier '_STAT_VER' 8# error: use of undeclared identifier '_STAT_VER'
14EXCLUDE_FROM_WORLD_pn-pseudo_libc-musl = "1" 9EXCLUDE_FROM_WORLD_pn-pseudo_libc-musl = "1"
15 10
diff --git a/meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch b/meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch
new file mode 100644
index 0000000..6eee674
--- /dev/null
+++ b/meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch
@@ -0,0 +1,37 @@
1From c7a2a65d6c2a433312540c207860740d6e4e7629 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 11 Mar 2018 17:32:54 -0700
4Subject: [PATCH] daemon.c: Libtirpc porting fixes
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 daemon.c | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/daemon.c b/daemon.c
14index 22f30f6..028a181 100644
15--- a/daemon.c
16+++ b/daemon.c
17@@ -117,7 +117,7 @@ void logmsg(int prio, const char *fmt, ...)
18 */
19 struct in_addr get_remote(struct svc_req *rqstp)
20 {
21- return (svc_getcaller(rqstp->rq_xprt))->sin_addr;
22+ return ((struct sockaddr_in*)svc_getcaller(rqstp->rq_xprt))->sin_addr;
23 }
24
25 /*
26@@ -125,7 +125,7 @@ struct in_addr get_remote(struct svc_req *rqstp)
27 */
28 short get_port(struct svc_req *rqstp)
29 {
30- return (svc_getcaller(rqstp->rq_xprt))->sin_port;
31+ return ((struct sockaddr_in*)svc_getcaller(rqstp->rq_xprt))->sin_port;
32 }
33
34 /*
35--
362.16.2
37
diff --git a/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb b/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
index 52aa17e..8a76e5d 100644
--- a/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
+++ b/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
@@ -9,9 +9,11 @@ RECIPE_UPSTREAM_DATE = "Oct 08, 2015"
9CHECK_DATE = "Dec 10, 2015" 9CHECK_DATE = "Dec 10, 2015"
10 10
11DEPENDS = "flex-native bison-native flex" 11DEPENDS = "flex-native bison-native flex"
12DEPENDS_append_libc-musl = " libtirpc" 12DEPENDS += "libtirpc"
13DEPENDS_append_class-nativesdk = " flex-nativesdk" 13DEPENDS_append_class-nativesdk = " flex-nativesdk"
14 14
15ASNEEDED = ""
16
15MOD_PV = "497" 17MOD_PV = "497"
16S = "${WORKDIR}/trunk" 18S = "${WORKDIR}/trunk"
17# Only subversion url left in OE-Core, use a mirror tarball instead since 19# Only subversion url left in OE-Core, use a mirror tarball instead since
@@ -25,7 +27,8 @@ SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/trunk_svn.code.sf.ne
25 file://rename_fh_cache.patch \ 27 file://rename_fh_cache.patch \
26 file://relative_max_socket_path_len.patch \ 28 file://relative_max_socket_path_len.patch \
27 file://tcp_no_delay.patch \ 29 file://tcp_no_delay.patch \
28 " 30 file://0001-daemon.c-Libtirpc-porting-fixes.patch \
31 "
29SRC_URI[md5sum] = "2e43e471c77ade0331901c40b8f8e9a3" 32SRC_URI[md5sum] = "2e43e471c77ade0331901c40b8f8e9a3"
30SRC_URI[sha256sum] = "21009468a9ba07b72ea93780d025a63ab4e55bf8fc3127803c296f0900fe1bac" 33SRC_URI[sha256sum] = "21009468a9ba07b72ea93780d025a63ab4e55bf8fc3127803c296f0900fe1bac"
31 34
@@ -33,7 +36,8 @@ BBCLASSEXTEND = "native nativesdk"
33 36
34inherit autotools 37inherit autotools
35EXTRA_OECONF_append_class-native = " --sbindir=${bindir}" 38EXTRA_OECONF_append_class-native = " --sbindir=${bindir}"
36CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" 39CFLAGS += " -I${STAGING_INCDIR}/tirpc"
40LDFLAGS += " -ltirpc"
37 41
38# Turn off these header detects else the inode search 42# Turn off these header detects else the inode search
39# will walk entire file systems and this is a real problem 43# will walk entire file systems and this is a real problem