summaryrefslogtreecommitdiff
path: root/modules/computer
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2017-07-06 22:39:43 -0500
committerLeandro Pereira <leandro@hardinfo.org>2017-07-09 11:54:46 -0700
commitf73ac161b7801af8ebbc644cf0dd3c8f26b0a6e9 (patch)
treec2c97ab0fd5f42a5ef3377ec42194665a21b963b /modules/computer
parent425b4b20edeb741cd6114cc1c40bd198a9908407 (diff)
Add diet libc to libc detection
Demonstrate how a libc implementation without ldconfig might work. Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/computer')
-rw-r--r--modules/computer/os.c2
1 files changed, 2 insertions, 0 deletions
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