From 620997880825682ac43eec3e0fcc9c40407dd5c4 Mon Sep 17 00:00:00 2001 From: Burt P Date: Thu, 20 Jul 2017 22:28:09 -0500 Subject: computer/os.c: another libc detection fix Starting in Debian 9, ldconfig requires root, and so it can't be used to get the GLIBC version. Try `ldd --version` first. It should give the same results. Signed-off-by: Burt P --- modules/computer/os.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/modules/computer/os.c b/modules/computer/os.c index 3ea4189e..72cd0b5c 100644 --- a/modules/computer/os.c +++ b/modules/computer/os.c @@ -25,17 +25,19 @@ static gchar * get_libc_version(void) { static const struct { - const char *test_cmd; - const char *match_str; - const char *lib_name; - gboolean try_ver_str; - gboolean use_stderr; + const char *test_cmd; + const char *match_str; + const char *lib_name; + gboolean try_ver_str; + gboolean use_stderr; } libs[] = { - { "ldconfig -V", "GLIBC", N_("GNU C Library"), TRUE, FALSE}, - { "ldconfig -V", "GNU libc", N_("GNU C Library"), TRUE, FALSE}, - { "ldconfig -v", "uClibc", N_("uClibc or uClibc-ng"), FALSE, FALSE}, - { "diet", "diet version", N_("diet libc"), TRUE, TRUE}, - { } + { "ldd --version", "GLIBC", N_("GNU C Library"), TRUE, FALSE}, + { "ldd --version", "GNU libc", N_("GNU C Library"), TRUE, FALSE}, + { "ldconfig -V", "GLIBC", N_("GNU C Library"), TRUE, FALSE}, + { "ldconfig -V", "GNU libc", N_("GNU C Library"), TRUE, FALSE}, + { "ldconfig -v", "uClibc", N_("uClibc or uClibc-ng"), FALSE, FALSE}, + { "diet", "diet version", N_("diet libc"), TRUE, TRUE}, + { NULL } }; int i; -- cgit v1.2.3