[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v2 3/3] lib/posix-sysinfo: glibc version workaround for `uname` (prepend 5-)



Reviewed-by: Gaulthier Gain <gaulthier.gain@xxxxxxxxx>

> On 9 Jan 2020, at 11:22, Simon Kuenzer <simon.kuenzer@xxxxxxxxx> wrote:
> 
> During glibc initialization, the library is doing a `uname` system
> call in order to detect the kernel version. It looks into the release
> field and parses the string. We prepend (for us meaningless) "5-" to
> our version string in order to tell glibc that it runs on a new enough
> kernel.
> 
> Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
> ---
> lib/posix-sysinfo/sysinfo.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/posix-sysinfo/sysinfo.c b/lib/posix-sysinfo/sysinfo.c
> index abcbb79d..2bf2c12a 100644
> --- a/lib/posix-sysinfo/sysinfo.c
> +++ b/lib/posix-sysinfo/sysinfo.c
> @@ -46,7 +46,10 @@
> static struct utsname utsname = {
>       .sysname        = "Unikraft",
>       .nodename       = "unikraft",
> -     .release        = STRINGIFY(UK_CODENAME),
> +     /* glibc looks into the release field to check the kernel version:
> +      * We prepend '5-' in order to be "new enough" for it.
> +      */
> +     .release        = "5-" STRINGIFY(UK_CODENAME),
>       .version        = STRINGIFY(UK_FULLVERSION),
> #ifdef CONFIG_ARCH_X86_64
>       .machine        = "x86_64"
> -- 
> 2.20.1
> 


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.