Build fails on FreeBSD 15: error: redefinition of 'getpeername'

getpeername.c:98:1: error: redefinition of 'getpeername'
   98 | LIBC_GETPEERNAME_DECL
      | ^
./torsocks.h:408:3: note: expanded from macro 'LIBC_GETPEERNAME_DECL'
  408 |                 LIBC_GETPEERNAME_NAME(LIBC_GETPEERNAME_SIG)
      |                 ^
./torsocks.h:190:31: note: expanded from macro 'LIBC_GETPEERNAME_NAME'
  190 | #define LIBC_GETPEERNAME_NAME getpeername
      |                               ^
/usr/include/ssp/socket.h:50:30: note: previous definition is here
   50 | __ssp_redirect_raw_impl(int, getpeername, getpeername,
      |                              ^
1 error generated.

Version: 2.4.0