[PATCH v2] resolv, rt: Change some extern inline functions to static inline __always_inline

Peter Collingbourne pcc@google.com
Mon May 4 18:31:38 GMT 2026


On Mon, May 4, 2026 at 11:12 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Peter Collingbourne:
>
> > 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.
>
> Well, that still results in build failures if the functions are not
> inlined (though under different circumstances).

I suppose, although I've always understood that the always_inline
inlining failure error should only happen if inlining is "impossible",
which is in principle something that's within the control of the
source code.

>  The first patch was
> better in that regard.  Maybe we should go with that one for now, after
> all.

I think that would be my preference. As I noted in my reply there, it
doesn't seem important whether this function is inlined.

Peter


More information about the Libc-alpha mailing list