Bug#825975: Invitation to sysvinit maintenance

Adam Borowski kilobyte at angband.pl
Wed Nov 21 15:37:35 GMT 2018


On Wed, Nov 21, 2018 at 11:00:16AM -0400, Jesse Smith wrote:
> On 11/21/18 10:56 AM, Adam Borowski wrote:
> > On Wed, Nov 21, 2018 at 10:30:24AM -0400, Jesse Smith wrote:
> >> I was wondering about that myself so I checked and asprintf() is
> >> available on FreeBSD systems, which doesn't use glibc. Is there a
> >> specific C library you know of which does not offer asprintf?
> > 
> > Windows I think.  But if you want to be safe, you can grab the copypasta
> > from https://github.com/kilobyte/termrec/blob/master/sys/asprintf.c -- I
> > don't quite remember where I got it from originally.
> 
> Somehow I'm not worried about Windows market. Anyone know if musl C has
> asprintf()? It's the only C library I can think of which might be
> missing the feature on a platform we support.

Seems to work for me:

#define _GNU_SOURCE
#include <stdio.h>
int main()
{
    char*s;
    asprintf(&s, "foo %s", "bar");
    printf("[%s]\n", s);
    return 0;
}

$ musl-ldd a.out 
	/lib/ld-musl-x86_64.so.1 (0x7f742a431000)
	libc.so => /lib/ld-musl-x86_64.so.1 (0x7f742a431000)


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ Have you heard of the Amber Road?  For thousands of years, the
⣾⠁⢰⠒⠀⣿⡁ Romans and co valued amber, hauled through the Europe over the
⢿⡄⠘⠷⠚⠋⠀ mountains and along the Vistula, from Gdańsk.  To where it came
⠈⠳⣄⠀⠀⠀⠀ together with silk (judging by today's amber stalls).




More information about the Debian-init-diversity mailing list