From f73ac161b7801af8ebbc644cf0dd3c8f26b0a6e9 Mon Sep 17 00:00:00 2001 From: Burt P Date: Thu, 6 Jul 2017 22:39:43 -0500 Subject: Add diet libc to libc detection Demonstrate how a libc implementation without ldconfig might work. Signed-off-by: Burt P --- modules/computer/os.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/computer/os.c b/modules/computer/os.c index 50fa2bb4..f15be866 100644 --- a/modules/computer/os.c +++ b/modules/computer/os.c @@ -34,6 +34,7 @@ get_libc_version(void) } libs[] = { { .test_cmd = "ldconfig -V", .match_str = "GLIBC", .lib_name = "GNU C Library" }, { .test_cmd = "ldconfig -v", .match_str = "uClibc", .lib_name = "uClibc or uClibc-ng" }, + { .test_cmd = "diet", .match_str = "diet version", .lib_name = "diet libc" }, { NULL, NULL, NULL }, }; int i = 0; @@ -58,6 +59,7 @@ get_libc_version(void) switch (i) { case 0: /* GLIBC */ + case 3: /* diet libc */ if (ver_str) ret = g_strdup_printf("%s / %s", libs[i].lib_name, ver_str ); else -- cgit v1.2.3