libtirpc sets the structure to sockaddr_in6 which causes the following compile errors:
daemon.c: In function 'get_remote':
daemon.c:113:43: error: 'struct sockaddr_in6' has no member named 'sin_addr'
return (svc_getcaller(rqstp->rq_xprt))->sin_addr;
^
daemon.c: In function 'get_port':
daemon.c:121:43: error: 'struct sockaddr_in6' has no member named 'sin_port'
return (svc_getcaller(rqstp->rq_xprt))->sin_port;
The answer is to cast it back from sockaddr_in6 to sockaddr_in as they are suppose to be backward compatible:
--- unfs3-0.9.22/daemon.c
+++ unfs3-0.9.22b/daemon.c
@@ -110,7 +110,8 @@
/
struct in_addr get_remote(struct svc_req rqstp)
{
/
@@ -118,7 +119,8 @@
/
short get_port(struct svc_req *rqstp)
{
/*
The patch above seems to be working fine.
some information got thrown out in the inline patch (asterisks)
I attach the patch
Last edit: Paul Schutte 2016-11-08