From patchwork Mon May 4 17:50:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Collingbourne X-Patchwork-Id: 134441 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 9543B4BA79A2 for ; Mon, 4 May 2026 17:51:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9543B4BA79A2 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20251104 header.b=pmIGLM0W X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-dl1-x124a.google.com (mail-dl1-x124a.google.com [IPv6:2607:f8b0:4864:20::124a]) by sourceware.org (Postfix) with ESMTPS id 8098D4BAE7EF for ; Mon, 4 May 2026 17:51:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8098D4BAE7EF Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=flex--pcc.bounces.google.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8098D4BAE7EF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::124a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777917072; cv=none; b=x/Y0O6BC4a28WH6TpvT6m6tuO975gz6iQSEimQQmoXCZG8UVrpjGQAfEjuQjXoC8iUvtaN2FyrGaUWQXO4UR29hSoTpeWtExGv+VrINswrBejRl2vA4R0hGjsV8YN1i3+befwQllF/YQCSJjiMETFy14dpD/SrBmdtzvzyuoKQ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777917072; c=relaxed/simple; bh=4KfUjdWfDg0Vccqo2UXro5OcSXO/6fSpappQ7GSO3Wg=; h=DKIM-Signature:Date:Mime-Version:Message-ID:Subject:From:To; b=qRms9mVxTnxhNjvtv1BV3YaiNkXmfuKzVq0J+sFt/aM6MGWhOB66WKIiCh42sPathW7+vp64I9T62LCQIq0IJ+kRmfNtmyiXT6ENUD53OOdTPdmmXE8XWA38Cf58Wcyk+LgKaaNI+0jIxlUWsMtoliVfEyVeW7XWrsRg/JXdIVo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8098D4BAE7EF Received: by mail-dl1-x124a.google.com with SMTP id a92af1059eb24-1309f4ee96dso1001577c88.1 for ; Mon, 04 May 2026 10:51:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1777917071; x=1778521871; darn=sourceware.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=MN34IeaEW+rZs8q9fHXyZ21pMCGQoRaxvNqwVbwFhqw=; b=pmIGLM0WiAmbJxEDerktKqEIvCOomHbqHeMHS9Ans2Eqr0KgpeiBSM6gKUvOiG8SCw E8jmFOXZudvJQbnpxs0ohLw9pfg89n/5skqGNqVad9CzraOAnmDpMu7VxRJFy33mhutg LGDZQwrTmEJIpNoWrtO9v+Zvoe4TZFjFDCgJFSfKlaPwk3kv/c5kdvSywGr+Sf3k4F6l q/tzjDHsdmcT8ecLw3vsxAZzOY2009e+msguR0JeqHtky5XEurVURiy7/7JLChpIE8LN lgXRlAxra03rs7jExSzbEoZqAjfarJSMAxXUAkxd4+y8vPZYzW69PBjFnhJqvFqLGh7e LdUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777917071; x=1778521871; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=MN34IeaEW+rZs8q9fHXyZ21pMCGQoRaxvNqwVbwFhqw=; b=mwMyCYEpn356Gb9tsD3Rr1bdVuO7bNiiqbqarNjdvnTi5KNS9j/ugcIVGDAX6OeIrG QqzPVetn+47NhzCxY2rGPv2ie757CuEwgj49e+HA4fhfSEiJUjyDjGIuJyos985tpSpa XYFlwUewfppwAt1UuatEPuoWXKKfdA4QIPo4h31BlzAuuygzoNBq311rEJiGls0EcDM1 DePOBsEOVXopBOw2ZKoLs78HJHz7zMrR2pIg0Ki499+7zFL0exHtDu9fRig9nwDTdA8D JoD12HwMy4tJqhe6GRdITDnYfiungQGGN6pLlgiwt0QdW+p8HbJcIccl0NyWrTGwoOf0 FL+g== X-Gm-Message-State: AOJu0Yz/eL4qHFEG9rLIYh9s5lJz758VF2dc9pFcC8138IxXYUE/JZdl aD1LhnR/YGeffU1OdWSpUGwTRzwn0iJh6vyX/Q6d48LfPPzugBYu1yeAax9kJouSspsmH68gYhj sHhgNb7YG0rLiVlzB4kLdF03gcGVkiSWesPANoQSsXhOkizZM3cwGi6j6TF6MCh1qNhL3uo/uSm DVqJyPlfFxswV1ShjdgeWhFZhP X-Received: from dlbro6.prod.google.com ([2002:a05:7022:1586:b0:12d:b319:ccc4]) (user=pcc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:4590:b0:12d:de3f:f3e3 with SMTP id a92af1059eb24-12dfd86a033mr4900450c88.35.1777917070923; Mon, 04 May 2026 10:51:10 -0700 (PDT) Date: Mon, 4 May 2026 10:50:54 -0700 Mime-Version: 1.0 X-Mailer: git-send-email 2.54.0.545.g6539524ca2-goog Message-ID: <20260504175054.2401724-1-pcc@google.com> Subject: [PATCH v2] resolv, rt: Change some extern inline functions to static inline __always_inline From: Peter Collingbourne To: libc-alpha@sourceware.org Cc: fweimer@redhat.com, yo@cristianrodriguez.net, Peter Collingbourne X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org The following functions: __aio_create_helper_thread __aio_start_notify_thread __gai_create_helper_thread __gai_start_notify_thread are declared as extern inline, but no translation unit provides their real definitions. This can lead to a link failure if the functions are not inlined. Fix it by declaring them as static inline __always_inline instead. --- v2: - Add __always_inline resolv/gai_misc.c | 2 +- rt/aio_misc.c | 2 +- sysdeps/mach/hurd/gai_misc.h | 4 ++-- sysdeps/nptl/gai_misc.h | 4 ++-- sysdeps/unix/sysv/linux/aio_misc.h | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resolv/gai_misc.c b/resolv/gai_misc.c index 5cf6d7c149..df6e5f7617 100644 --- a/resolv/gai_misc.c +++ b/resolv/gai_misc.c @@ -28,7 +28,7 @@ #ifndef gai_create_helper_thread # define gai_create_helper_thread __gai_create_helper_thread -extern inline int +static inline __always_inline int __gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), void *arg) { diff --git a/rt/aio_misc.c b/rt/aio_misc.c index 724486e66f..747b7edc61 100644 --- a/rt/aio_misc.c +++ b/rt/aio_misc.c @@ -33,7 +33,7 @@ #ifndef aio_create_helper_thread # define aio_create_helper_thread __aio_create_helper_thread -extern inline int +static inline __always_inline int __aio_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), void *arg) { pthread_attr_t attr; diff --git a/sysdeps/mach/hurd/gai_misc.h b/sysdeps/mach/hurd/gai_misc.h index 0237e59bf6..e57ff0e82a 100644 --- a/sysdeps/mach/hurd/gai_misc.h +++ b/sysdeps/mach/hurd/gai_misc.h @@ -22,7 +22,7 @@ #define gai_start_notify_thread __gai_start_notify_thread #define gai_create_helper_thread __gai_create_helper_thread -extern inline void +static inline __always_inline void __gai_start_notify_thread (void) { sigset_t ss; @@ -32,7 +32,7 @@ __gai_start_notify_thread (void) assert_perror (sigerr); } -extern inline int +static inline __always_inline int __gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), void *arg) { diff --git a/sysdeps/nptl/gai_misc.h b/sysdeps/nptl/gai_misc.h index 0416e271f4..998921da92 100644 --- a/sysdeps/nptl/gai_misc.h +++ b/sysdeps/nptl/gai_misc.h @@ -76,7 +76,7 @@ #define gai_start_notify_thread __gai_start_notify_thread #define gai_create_helper_thread __gai_create_helper_thread -extern inline void +static inline __always_inline void __gai_start_notify_thread (void) { sigset_t ss; @@ -84,7 +84,7 @@ __gai_start_notify_thread (void) (void) __pthread_sigmask (SIG_SETMASK, &ss, NULL); } -extern inline int +static inline __always_inline int __gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), void *arg) { diff --git a/sysdeps/unix/sysv/linux/aio_misc.h b/sysdeps/unix/sysv/linux/aio_misc.h index 578ff1cf27..d7add3c720 100644 --- a/sysdeps/unix/sysv/linux/aio_misc.h +++ b/sysdeps/unix/sysv/linux/aio_misc.h @@ -25,7 +25,7 @@ # define aio_start_notify_thread __aio_start_notify_thread # define aio_create_helper_thread __aio_create_helper_thread -extern inline void +static inline __always_inline void __aio_start_notify_thread (void) { sigset_t ss; @@ -34,7 +34,7 @@ __aio_start_notify_thread (void) __NSIG_BYTES); } -extern inline int +static inline __always_inline int __aio_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), void *arg) {