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>
This commit is contained in:
Khem Raj 2018-03-11 21:40:51 -07:00 committed by Richard Purdie
parent 283aca3918
commit e48e13e1cd
3 changed files with 44 additions and 8 deletions

View File

@ -5,11 +5,6 @@
# rt-tests needs PI mutex support in libc
EXCLUDE_FROM_WORLD_pn-rt-tests_libc-musl = "1"
# error: no member named 'sin_port' in 'struct sockaddr_in6'
# this is due to libtirpc using ipv6 but portmap rpc expecting ipv4
EXCLUDE_FROM_WORLD_pn-portmap_libc-musl = "1"
EXCLUDE_FROM_WORLD_pn-unfs3_libc-musl = "1"
# error: use of undeclared identifier '_STAT_VER'
EXCLUDE_FROM_WORLD_pn-pseudo_libc-musl = "1"

View File

@ -0,0 +1,37 @@
From c7a2a65d6c2a433312540c207860740d6e4e7629 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 11 Mar 2018 17:32:54 -0700
Subject: [PATCH] daemon.c: Libtirpc porting fixes
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending
daemon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/daemon.c b/daemon.c
index 22f30f6..028a181 100644
--- a/daemon.c
+++ b/daemon.c
@@ -117,7 +117,7 @@ void logmsg(int prio, const char *fmt, ...)
*/
struct in_addr get_remote(struct svc_req *rqstp)
{
- return (svc_getcaller(rqstp->rq_xprt))->sin_addr;
+ return ((struct sockaddr_in*)svc_getcaller(rqstp->rq_xprt))->sin_addr;
}
/*
@@ -125,7 +125,7 @@ struct in_addr get_remote(struct svc_req *rqstp)
*/
short get_port(struct svc_req *rqstp)
{
- return (svc_getcaller(rqstp->rq_xprt))->sin_port;
+ return ((struct sockaddr_in*)svc_getcaller(rqstp->rq_xprt))->sin_port;
}
/*
--
2.16.2

View File

@ -9,9 +9,11 @@ RECIPE_UPSTREAM_DATE = "Oct 08, 2015"
CHECK_DATE = "Dec 10, 2015"
DEPENDS = "flex-native bison-native flex"
DEPENDS_append_libc-musl = " libtirpc"
DEPENDS += "libtirpc"
DEPENDS_append_class-nativesdk = " flex-nativesdk"
ASNEEDED = ""
MOD_PV = "497"
S = "${WORKDIR}/trunk"
# 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
file://rename_fh_cache.patch \
file://relative_max_socket_path_len.patch \
file://tcp_no_delay.patch \
"
file://0001-daemon.c-Libtirpc-porting-fixes.patch \
"
SRC_URI[md5sum] = "2e43e471c77ade0331901c40b8f8e9a3"
SRC_URI[sha256sum] = "21009468a9ba07b72ea93780d025a63ab4e55bf8fc3127803c296f0900fe1bac"
@ -33,7 +36,8 @@ BBCLASSEXTEND = "native nativesdk"
inherit autotools
EXTRA_OECONF_append_class-native = " --sbindir=${bindir}"
CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
CFLAGS += " -I${STAGING_INCDIR}/tirpc"
LDFLAGS += " -ltirpc"
# Turn off these header detects else the inode search
# will walk entire file systems and this is a real problem