libc: use original 'gai_strerror()' implementation

This commit removes the dummy 'gai_strerror()' implementation in
favor of the one provided in the contrib sources to allow for better
diagnosing of DNS related problems.

As long as NLS is not set the implementation looks up the error string
via the error-code directly.

Fixes #5464.
This commit is contained in:
Josef Söntgen 2025-02-21 14:23:48 +01:00 committed by Christian Helmuth
parent 9cebdeb1a9
commit 48f37b4a46
3 changed files with 2 additions and 22 deletions

View File

@ -5,6 +5,7 @@ SRC_C = getservent.c nsdispatch.c nsparser.c nslexer.c
# needed for getaddrinfo()
SRC_C += getaddrinfo.c
SRC_C += gai_strerror.c
# needed for getnameinfo()
SRC_C += getnameinfo.c name6.c

View File

@ -12,7 +12,7 @@ LIBS += base vfs
# Back end
#
SRC_CC = atexit.cc dummies.cc rlimit.cc sysctl.cc \
issetugid.cc errno.cc gai_strerror.cc time.cc alarm.cc \
issetugid.cc errno.cc time.cc alarm.cc \
malloc.cc progname.cc fd_alloc.cc file_operations.cc \
plugin.cc plugin_registry.cc select.cc exit.cc environ.cc sleep.cc \
pread_pwrite.cc readv_writev.cc poll.cc \

View File

@ -1,21 +0,0 @@
/*
* \brief C-library back end
* \author Christian Prochaska
* \date 2010-05-16
*/
/*
* Copyright (C) 2010-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#include <base/log.h>
extern "C" const char *gai_strerror(int errcode)
{
static const char *result = "gai_strerror called, not yet implemented!";
Genode::log(__func__, ": ", result);
return result;
}