diff --git a/src/libAtomVM/otp_net.c b/src/libAtomVM/otp_net.c index a57a0aba9..b40e1f2ea 100644 --- a/src/libAtomVM/otp_net.c +++ b/src/libAtomVM/otp_net.c @@ -85,8 +85,10 @@ static term eai_errno_to_term(int err, GlobalContext *glb) #ifdef HAVE_EXTENDED_EAI_ERRNO case EAI_BADHINTS: return globalcontext_make_atom(glb, ATOM_STR("\xB", "eaibadhints")); +#ifdef HAVE_EAI_OVERFLOW case EAI_OVERFLOW: return globalcontext_make_atom(glb, ATOM_STR("\xB", "eaioverflow")); +#endif case EAI_PROTOCOL: return globalcontext_make_atom(glb, ATOM_STR("\xB", "eaiprotocol")); case EAI_SYSTEM: diff --git a/src/platforms/generic_unix/lib/CMakeLists.txt b/src/platforms/generic_unix/lib/CMakeLists.txt index b02dba9bf..90bfc30ff 100644 --- a/src/platforms/generic_unix/lib/CMakeLists.txt +++ b/src/platforms/generic_unix/lib/CMakeLists.txt @@ -102,6 +102,10 @@ check_symbol_exists(EAI_BADHINTS "netdb.h" HAVE_EXTENDED_EAI_ERRNO) if (HAVE_EXTENDED_EAI_ERRNO) target_compile_definitions(libAtomVM${PLATFORM_LIB_SUFFIX} PUBLIC HAVE_EXTENDED_EAI_ERRNO) endif() +check_symbol_exists(EAI_OVERFLOW "netdb.h" HAVE_EAI_OVERFLOW) +if (HAVE_EAI_OVERFLOW) + target_compile_definitions(libAtomVM${PLATFORM_LIB_SUFFIX} PUBLIC HAVE_EAI_OVERFLOW) +endif() if (COVERAGE) include(CodeCoverage)