From patchwork Fri May 1 00:54:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Collingbourne X-Patchwork-Id: 134296 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 C458E4371D44 for ; Fri, 1 May 2026 00:55:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C458E4371D44 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=nQuck36H 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 6D224437423E for ; Fri, 1 May 2026 00:54:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6D224437423E 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 6D224437423E 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=1777596881; cv=none; b=Mc804kCXPWPDrAa12azWRTOWjyf2F/EJUIZtq5m41CpgVUaui6DUWBgTrCYI/a4rftecugTC0hmdQIY4yBjrl0v2Lbk1w3IbkR1jHAvh5S97ITGYg46zfAUwjggqpVdch9DDpwzqS+cPUcCWuCESizP6Fv5VGk4WJ04KdHMxDj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777596881; c=relaxed/simple; bh=HHvSmkbaA5/m8PnXiuBZp+XmLg5+xeDHeltF6rf2DmU=; h=DKIM-Signature:Date:Mime-Version:Message-ID:Subject:From:To; b=FSpYb7VQWzyVkiMBpELmzr0GFh687suPNIb/g7ZVqDNJHSecWH8QHLGyI4R4zRqSVwCkJD/pu6qKGo6n0NXzBws/fVeKGRV2HzEk5ikaJlhxwiN9yFhDFGDVHK7e1o8329wMYjs2E6SquNzFXG0lDQUvTXa+qxtnqQY1WimD3bc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D224437423E Received: by mail-dl1-x124a.google.com with SMTP id a92af1059eb24-12c8de02a4dso8642372c88.1 for ; Thu, 30 Apr 2026 17:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1777596879; x=1778201679; darn=sourceware.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=b5yZKL8sjcK/kfcVktd2iGJ/s3DmWyLXicGNZbLHLb8=; b=nQuck36H2X4D7AgyCEkfywzXfu8bhtb0k5xql6cmpXTnBplovSCS34K5GZa8DjSyvM 0J2Rajc13ISoOUpmDqojYCwdV/t06U4oU++GCtQCG1aBP2ExC4DgeoCslwqZXUNSoZMf gpiy38b1P3t7xtsmhk9XZRqZgutabcaPJy8Kra9Sk7eLenMbHE/W2ch4egaDoJ+8+eP1 qHKS1iY2TMGzV9g9qOjao71l9ncI69KUur+16YfLQWBvDsmVyJOAhfhii/aazk88QI6P 6+4b4YJBQ6wj4RHfDVKo8rQu0IlRZuXXA+bQskeRyQj42eB8CrbNJYfDm9HJiy7EMp90 CaXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777596879; x=1778201679; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=b5yZKL8sjcK/kfcVktd2iGJ/s3DmWyLXicGNZbLHLb8=; b=KADM/P8V0GxX3pnsjDcXrfpStZ+7MRj2RHccvYabcxRVyo1PDoJJCRQ7chO1Pv6ODg NNO+9Lu+5fBkC9W0zjiEx37/RxJ9SJJO0Uvhi0i7+uNYdlqIn7hDtC1yRk20OQB/Rk7O RZiFKUqobZu1x+JKVoZeIU7iP3pXRR6vIi+q5gqU2Lupmr+/oFV1LvZ0Z34NDsvAaX8h 7NuhtTAgbLXo+pmBRTh6cvnmWLhQ+qa5MiIv7Q2ktZr6TjOdaKYVHcqsCNElvO3mo6bT 9gDcHL4GlgcCRcWG4dMXK83G7T8qdhtjvq4QSRO+/GOqJzhLVzGgKi5Qw8Qh/VjJ0OFS R2xQ== X-Gm-Message-State: AOJu0Yw5w3NhtuZ8Xh+/PEvEHAgwXPKSPx7PSsy05tdM/SHBziXDq7po 3Dl2PRHgt6jH34QOj1Vcc5acRg3PNwW2L4BHgkEi0EqucRBSZA/skKwAP9in3e7ip3FcFuXEpgk xmDS6dzs7IRASHZg6xYZph9u0EOl1ecBAtf6bM3XrlSxJIIsy8LQ+Lw8zejx1CI6EyXxj3BfLrW MTuJZDiMEP5STS8eRx0NZf9iGJ X-Received: from dlaj10.prod.google.com ([2002:a05:701b:280a:b0:12c:912f:7d3f]) (user=pcc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:eacf:b0:12d:ea4f:99e0 with SMTP id a92af1059eb24-12dea9b6679mr2833387c88.0.1777596878554; Thu, 30 Apr 2026 17:54:38 -0700 (PDT) Date: Thu, 30 Apr 2026 17:54:28 -0700 Mime-Version: 1.0 X-Mailer: git-send-email 2.54.0.545.g6539524ca2-goog Message-ID: <20260501005428.4105376-1-pcc@google.com> Subject: [PATCH] resolv, rt: Change some extern inline functions to static inline From: Peter Collingbourne To: libc-alpha@sourceware.org Cc: Peter Collingbourne X-Spam-Status: No, score=-19.9 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 instead. Reviewed-by: Florian Weimer --- 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..3f13dc4520 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 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..639d693418 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 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..832c5ae1b6 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 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 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..8461fa88bf 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 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 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..81a917f42d 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 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 int __aio_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), void *arg) {