From patchwork Wed Jun 4 08:15:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Haehnel X-Patchwork-Id: 2093755 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernkonzept.com header.i=@kernkonzept.com header.a=rsa-sha256 header.s=mx1 header.b=GbRqtrxY; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=patchwork.ozlabs.org) Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4bC0mR0jtNz1yDX for ; Wed, 4 Jun 2025 18:16:52 +1000 (AEST) Authentication-Results: helium.openadk.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernkonzept.com header.i=@kernkonzept.com header.a=rsa-sha256 header.s=mx1 header.b=GbRqtrxY; dkim-atps=neutral Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 7BEC235389AF; Wed, 4 Jun 2025 10:16:55 +0200 (CEST) Received: from mx.kernkonzept.com (serv1.kernkonzept.com [159.69.200.6]) by helium.openadk.org (Postfix) with ESMTPS id 7EB2A3521809 for ; Wed, 4 Jun 2025 10:16:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kernkonzept.com; s=mx1; h=Content-Transfer-Encoding:MIME-Version:Message-ID :Date:Subject:Cc:To:From:References:In-Reply-To:Reply-To:Content-Type: Content-ID:Content-Description; bh=5v8orlom3EIeRvIAGtOmCYdwxhHLMWi0rrcJAFvka3w=; b=GbRqtrxYAMNsI6CZ7uEZt5ddrz gh4Xy5RdHD7I2paM6V5Wy21wN4QNMCw0UFSx5NAXfYFyLphng4+UoNhk0+uLRiPOJP9ELvPmu8bsD y5hSv9GgvDUol/yC0oDN+K7LDx1Jsl66SGAUYE0EV34b4by7MHbSTGMyYyDKrr4Eju4T64aCzG7Wv q/AqsGBs/iSlTuyl2xhSewSKWuUh8EawZQjSXxJLJyXw25YeoFlun4tBCVkfg+Ycl7kxYE3XHLdQo yMb5Gw1ME9IaV6oU1S+G0dNF+txQ1KW0PG+0dac4g3uJipOIr3A3+H52H0fDRnF9t/UjcvPOj0GX4 ZvnAXipA==; Received: from [10.22.3.160] (helo=amethyst.dd1.int.kernkonzept.com) by mx.kernkonzept.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) id 1uMjIX-00EzL8-24; Wed, 04 Jun 2025 10:16:33 +0200 From: Marcus Haehnel To: devel@uclibc-ng.org Date: Wed, 4 Jun 2025 10:15:49 +0200 Message-ID: <20250604081621.18145-1-marcus.haehnel@kernkonzept.com> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Message-ID-Hash: 6F73OMMJXV2O2OCGGK43SREYO4EAJWE3 X-Message-ID-Hash: 6F73OMMJXV2O2OCGGK43SREYO4EAJWE3 X-MailFrom: marcus.haehnel@kernkonzept.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Marcus Haehnel X-Mailman-Version: 3.3.8 Precedence: list Subject: [uclibc-ng-devel] [PATCH] inet/netdb: fix getnameinfo signature List-Id: uClibc-ng Development Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: According to POSIX the getnameinfo flags parameter is int and not unsigned. Adapt accordingly. Glibc has also fixed this in commit e4ecafe004b3d4270b3a9dace8f970047400ed38 in 2001. Signed-off-by: Marcus Haehnel --- include/netdb.h | 2 +- libc/inet/resolv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/netdb.h b/include/netdb.h index a85797956..26c999e59 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -689,7 +689,7 @@ extern const char *gai_strerror (int __ecode) __THROW; extern int getnameinfo (const struct sockaddr *__restrict __sa, socklen_t __salen, char *__restrict __host, socklen_t __hostlen, char *__restrict __serv, - socklen_t __servlen, unsigned int __flags); + socklen_t __servlen, int __flags); libc_hidden_proto(getnameinfo) #endif /* POSIX */ diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 130a9a505..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;