[glibc] resolv, rt: Change some extern inline functions to static inline

Florian Weimer via Glibc-cvs <[email protected]> Fri, 8 May 2026 17:54:26 +0000 (GMT)
Newsgroups gmane.comp.lib.glibc.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c20e60e3507ac1fd859131e81ac237a663267c45

commit c20e60e3507ac1fd859131e81ac237a663267c45
Author: Peter Collingbourne <[email protected]>
Date:   Fri May 8 19:53:24 2026 +0200

    resolv, rt: Change some extern inline functions to static inline
    
    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 <[email protected]>

Diff:
---
 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)
 {