Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250523135402.GL1827@brightrain.aerifal.cx>
Date: Fri, 23 May 2025 09:54:04 -0400
From: Rich Felker <dalias@...c.org>
To: Alejandro Colomar <alx@...nel.org>
Cc: musl@...ts.openwall.com, Jeffrey Walton <noloader@...il.com>
Subject: Re: sgetspent(3) on musl

On Fri, May 23, 2025 at 02:00:58PM +0200, Alejandro Colomar wrote:
> Hi Rich,
> 
> On Fri, Nov 29, 2024 at 01:11:44AM -0500, Rich Felker wrote:
> > On Wed, Nov 27, 2024 at 01:10:20PM +0100, Alejandro Colomar wrote:
> > > Hi Rich,
> > > 
> > > Link: <https://github.com/shadow-maint/shadow/pull/1115#issuecomment-2466994769>
> > > 
> > > There seems to be a prototype for sgetspent(3) on musl libc, but I don't
> > > find an definition.  The prototype is there since commit 0.  Is that a
> > > bug?  (It looks like a bug, unless I'm missing something.)  This results
> > > in linker errors.  Should the prototype be removed, or the definition be
> > > added?
> > 
> > I think having the declaration there is just an oversight. Unless
> > we've encountered things that need the missing function, we should
> > probably just remove the declaration.
> > 
> > FWIW though I don't generally expect spurious declarations like this
> > to do any harm -- detection should be via a compile-and-link test not
> > just looking for a declaration. Is there a build system these days
> > that's doing purely declaration-based detection?
> 
> I'm coming back to this, because it's more problematic than I initially
> thought.
> 
> In shadow, I have a function prototype *and* a function declaration for
> this API (when compiling for musl; in glibc I rely on the libc one).
> 
> Now I was trying to enable -Werror=redundant-decls (among many other
> errors), but my declaration is redundant with the musl one, and so I
> can't enable this error.  Would you mind removing it from musl?
> 
> <https://github.com/shadow-maint/shadow/pull/1220#issuecomment-2676737629>

Sure thing. I have a patch, just not upstream. Will push it.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.