diff options
Diffstat (limited to 'libc')
130 files changed, 1999 insertions, 1169 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index d7a659a8c..44685e6b8 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -1892,7 +1892,7 @@ int getnameinfo(const struct sockaddr *sa, socklen_t hostlen, char *serv, socklen_t servlen, - unsigned flags) + int flags) { int serrno = errno; bool ok = 0; @@ -2699,7 +2699,7 @@ int gethostent_r(struct hostent *result_buf, char *buf, size_t buflen, hostp = __open_etc_hosts(); if (hostp == NULL) { *result = NULL; - ret = TRY_AGAIN; + *h_errnop = ret = TRY_AGAIN; goto DONE; } } diff --git a/libc/misc/auxvt/getauxval.c b/libc/misc/auxvt/getauxval.c index 2bdffaf2c..7610b7e5c 100755 --- a/libc/misc/auxvt/getauxval.c +++ b/libc/misc/auxvt/getauxval.c @@ -17,32 +17,28 @@ * <http://www.gnu.org/licenses/>. */ -#include "errno.h" -#include "ldso.h" -#include "sys/auxv.h" +#include <errno.h> +#include <ldso.h> +#include <sys/auxv.h> - -/* - * - * aarch64 gcc 11 uses __getauxval() in init_have_lse_atomics() - * - */ unsigned long int __getauxval (unsigned long int __type) { - if ( __type >= AUX_MAX_AT_ID ){ + // Requested value part of cached subset of auxiliary vector? + if (__type < AUX_MAX_AT_ID) { + if (_dl_auxvt[__type].a_type == __type) + return _dl_auxvt[__type].a_un.a_val; + __set_errno (ENOENT); return 0; } - if ( _dl_auxvt[__type].a_type == __type){ - return _dl_auxvt[__type].a_un.a_val; - } |