support: account for protosw change

e7d02be19 ("protosw: refactor protosw and domain static declaration and
load") changed the way this function should be invoked.

Link: e7d02be19d
Reported-by: Michael Pro <michael.adm@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2022-09-04 19:06:00 +02:00
parent 3cc22b29d6
commit 20584d1c32
1 changed files with 4 additions and 0 deletions

View File

@ -37,7 +37,11 @@ sogetsockaddr(struct socket *so, struct sockaddr **nam)
int error;
CURVNET_SET(so->so_vnet);
#if __FreeBSD_version < 1400066
error = (*so->so_proto->pr_usrreqs->pru_sockaddr)(so, nam);
#else
error = so->so_proto->pr_sockaddr(so, nam);
#endif
CURVNET_RESTORE();
return (error);
}