lib/tsocket: Fix build on Freebsd
authorAmitay Isaacs <amitay@gmail.com>
Wed, 15 Sep 2021 04:29:28 +0000 (14:29 +1000)
committerJeremy Allison <jra@samba.org>
Thu, 16 Sep 2021 19:42:19 +0000 (19:42 +0000)
commit8d5534d2369ea2654703c93697b3d5257da3cdb6
tree7579ccfdb451f445ccc8cf7fa5cba210759214b3
parentd12cb47724c2e8d19a28286d4c3ef72271a002fd
lib/tsocket: Fix build on Freebsd

This fixes the following build error on freebsd.

[1567/3959] Compiling lib/tsocket/tsocket_bsd.c
../../lib/tsocket/tsocket_bsd.c:415:8: error: use of undeclared identifier 'EAI_ADDRFAMILY'
                case EAI_ADDRFAMILY:
                     ^

On FreeBSD EAI_ADDRFAMILY is obsoleted.  Here's the relevant excerpt
from netdb.h on FreeBSD 13.

-----------------------------------------------------------------
  /*
   * Error return codes from gai_strerror(3), see RFC 3493.
   */
  #if 0
  /* Obsoleted on RFC 2553bis-02 */
  #define EAI_ADDRFAMILY   1      /* address family for hostname not supported */
  #endif
-----------------------------------------------------------------

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Sep 16 19:42:19 UTC 2021 on sn-devel-184
lib/tsocket/tsocket_bsd.c