--- unfs3-0.9.22/daemon.c
+++ unfs3-0.9.22-musl/daemon.c
@@ -110,7 +110,8 @@
  */
 struct in_addr get_remote(struct svc_req *rqstp)
 {
-    return (svc_getcaller(rqstp->rq_xprt))->sin_addr;
+    struct sockaddr_in *sin = nfs_getrpccaller_in(rqstp->rq_xprt);
+    return sin->sin_addr;
 }
 
 /*
@@ -118,7 +119,8 @@
  */
 short get_port(struct svc_req *rqstp)
 {
-    return (svc_getcaller(rqstp->rq_xprt))->sin_port;
+    struct sockaddr_in *sin = nfs_getrpccaller_in(rqstp->rq_xprt);
+    return sin->sin_port;
 }
 
 /*
--- unfs3-0.9.22/daemon.h
+++ unfs3-0.9.22-musl/daemon.h
@@ -46,4 +46,9 @@
 extern int	opt_brute_force;
 extern int	opt_readable_executables;
 
+static inline struct sockaddr_in *nfs_getrpccaller_in(SVCXPRT *xprt)
+{
+	return (struct sockaddr_in *)svc_getcaller(xprt);
+}
+
 #endif
