mount: Add missing cast to getsockname
Subsystems (2)
PATCH 1/1 mount: Add missing cast to getsockname
Otherwise compilation can fail with incompatible pointer type.
Signed-off-by Rosen Penev <[email protected]>
--- utils/mount/network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
utils/mount/network.c +1 -1
@@ -1062,7 +1062,7 @@ int clnt_ping(struct sockaddr_in *saddr, const unsigned long prog,if (caddr) {/* Get the address of our end of this connection */ socklen_t len =sizeof (*caddr); -if (getsockname (sock, caddr, &len) !=0 ) +if (getsockname (sock, (struct sockaddr *) caddr, &len) !=0 ) caddr->sin_family =0 ; }
Signature · 1 line
2.17.1
Quoted 3 lines · Rosen Penev
Otherwise compilation can fail with incompatible pointer type.
Signed-off-by Rosen Penev <[email protected]>
Committed....
steved.
Quoted 18 lines
--- utils/mount/network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)utils/mount/network.c +1
-1@@ -1062,7 +1062,7 @@ int clnt_ping(struct sockaddr_in *saddr, const unsigned long prog,if (caddr) {/* Get the address of our end of this connection */ socklen_t len =sizeof (*caddr); -if (getsockname (sock, caddr, &len) !=0 ) +if (getsockname (sock, (struct sockaddr *) caddr, &len) !=0 ) caddr->sin_family =0 ; }