Re: [PATCH v4 06/15] bugreport: add glibc version

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

 



Emily Shaffer <emilyshaffer@xxxxxxxxxx> writes:

> To help pinpoint the source of a regression, it is useful to know the
> version of libc which the user's Git client was built with. Let's
> include it alongside the other versioning information, which is used to
> identify how the client was built.
>
> Signed-off-by: Emily Shaffer <emilyshaffer@xxxxxxxxxx>
> ---
>  bugreport.c | 5 +++++
>  1 file changed, 5 insertions(+)

This is the first iffy one in the series.  It is unreasonable to
assume that we can dictate that Git can be built only on glibc
systems, no?

Making this conditional, perhaps make "bugreport.c" depend on
"extern void get_compiler_info(struct strbuf *sys_info)" and require
the function to be defined in compat/; the glibc variant that uses
gnu_get_libc_version() would become just one of them.

> diff --git a/bugreport.c b/bugreport.c
> index 9c69e3fa34..af715dc157 100644
> --- a/bugreport.c
> +++ b/bugreport.c
> @@ -4,6 +4,7 @@
>  #include "strbuf.h"
>  #include "time.h"
>  #include "help.h"
> +#include <gnu/libc-version.h>
>  
>  static void get_system_info(struct strbuf *sys_info)
>  {
> @@ -27,6 +28,10 @@ static void get_system_info(struct strbuf *sys_info)
>  			    uname_info.release,
>  			    uname_info.version,
>  			    uname_info.machine);
> +
> +	strbuf_addstr(sys_info, "glibc version: ");
> +	strbuf_addstr(sys_info, gnu_get_libc_version());
> +	strbuf_complete_line(sys_info);
>  }
>  
>  static const char * const bugreport_usage[] = {



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux