mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-17 14:07:03 +01:00
dirmngr: Build fix for FreeBSD (EAI macros)
* dirmngr/dns-stuff.c (map_eai_to_gpg_error): Map EAI_NODATA and EAI_ADDRFAMILY only if defined. -- Reported-by: Christoph Moench-Tegeder <cmt@burggraben.net> Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
f099042d82
commit
4d67144142
@ -177,13 +177,17 @@ map_eai_to_gpg_error (int ec)
|
|||||||
case EAI_BADFLAGS: err = gpg_error (GPG_ERR_INV_FLAG); break;
|
case EAI_BADFLAGS: err = gpg_error (GPG_ERR_INV_FLAG); break;
|
||||||
case EAI_FAIL: err = gpg_error (GPG_ERR_SERVER_FAILED); break;
|
case EAI_FAIL: err = gpg_error (GPG_ERR_SERVER_FAILED); break;
|
||||||
case EAI_MEMORY: err = gpg_error (GPG_ERR_ENOMEM); break;
|
case EAI_MEMORY: err = gpg_error (GPG_ERR_ENOMEM); break;
|
||||||
|
#ifdef EAI_NODATA
|
||||||
case EAI_NODATA: err = gpg_error (GPG_ERR_NO_DATA); break;
|
case EAI_NODATA: err = gpg_error (GPG_ERR_NO_DATA); break;
|
||||||
|
#endif
|
||||||
case EAI_NONAME: err = gpg_error (GPG_ERR_NO_NAME); break;
|
case EAI_NONAME: err = gpg_error (GPG_ERR_NO_NAME); break;
|
||||||
case EAI_SERVICE: err = gpg_error (GPG_ERR_NOT_SUPPORTED); break;
|
case EAI_SERVICE: err = gpg_error (GPG_ERR_NOT_SUPPORTED); break;
|
||||||
case EAI_FAMILY: err = gpg_error (GPG_ERR_EAFNOSUPPORT); break;
|
case EAI_FAMILY: err = gpg_error (GPG_ERR_EAFNOSUPPORT); break;
|
||||||
case EAI_SOCKTYPE: err = gpg_error (GPG_ERR_ESOCKTNOSUPPORT); break;
|
case EAI_SOCKTYPE: err = gpg_error (GPG_ERR_ESOCKTNOSUPPORT); break;
|
||||||
#ifndef HAVE_W32_SYSTEM
|
#ifndef HAVE_W32_SYSTEM
|
||||||
|
# ifdef EAI_ADDRFAMILY
|
||||||
case EAI_ADDRFAMILY:err = gpg_error (GPG_ERR_EADDRNOTAVAIL); break;
|
case EAI_ADDRFAMILY:err = gpg_error (GPG_ERR_EADDRNOTAVAIL); break;
|
||||||
|
# endif
|
||||||
case EAI_SYSTEM: err = gpg_error_from_syserror (); break;
|
case EAI_SYSTEM: err = gpg_error_from_syserror (); break;
|
||||||
#endif
|
#endif
|
||||||
default: err = gpg_error (GPG_ERR_UNKNOWN_ERRNO); break;
|
default: err = gpg_error (GPG_ERR_UNKNOWN_ERRNO); break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user