On Wed, Feb 17, 2016 at 04:59:36PM +0100, Pino Toscano wrote:
On Wednesday 17 February 2016 14:22:34 Richard W.M. Jones wrote:
> ---
> init/init.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/init/init.c b/init/init.c
> index 25d6bc6..38392c4 100644
> --- a/init/init.c
> +++ b/init/init.c
> @@ -94,6 +94,15 @@ main ()
> print_uptime ();
> fprintf (stderr, "supermin: ext2 mini initrd starting up: "
> PACKAGE_VERSION
> +#if defined(__dietlibc__)
> + " dietlibc"
> +#elif defined(__GLIBC__)
> + " glibc"
This needs to be put as last, as libc implementations that copied the
glibc headers (such as uclibc) define __GLIBC__...
OK.
> +#elif defined(__NEWLIB_H__)
> + " newlib"
> +#elif defined(__UCLIBC__)
> + " uClibc"
#else
# error unrecognized libc
While not having an identification string is not an issue, requiring it
might ease check whether supermin has actually been tested with a libc.
Unfortunately musl refuses to have such a define. Bogus explanation
here:
http://www.musl-libc.org/faq.html
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html