summaryrefslogtreecommitdiff
path: root/lib/tsocket
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2021-09-15 14:29:28 +1000
committerJeremy Allison <jra@samba.org>2021-09-16 19:42:19 +0000
commit8d5534d2369ea2654703c93697b3d5257da3cdb6 (patch)
tree7579ccfdb451f445ccc8cf7fa5cba210759214b3 /lib/tsocket
parentd12cb47724c2e8d19a28286d4c3ef72271a002fd (diff)
downloadsamba-8d5534d2369ea2654703c93697b3d5257da3cdb6.tar.gz
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
Diffstat (limited to 'lib/tsocket')
-rw-r--r--lib/tsocket/tsocket_bsd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c
index 39a95e4c5ec..9485da7c8af 100644
--- a/lib/tsocket/tsocket_bsd.c
+++ b/lib/tsocket/tsocket_bsd.c
@@ -412,7 +412,9 @@ int _tsocket_address_inet_from_strings(TALLOC_CTX *mem_ctx,
switch (ret) {
case EAI_FAIL:
case EAI_NONAME:
+#ifdef EAI_ADDRFAMILY
case EAI_ADDRFAMILY:
+#endif
errno = EINVAL;
break;
}