diff options
author | Burt P <pburt0@gmail.com> | 2017-07-06 22:39:43 -0500 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2017-07-09 11:54:46 -0700 |
commit | f73ac161b7801af8ebbc644cf0dd3c8f26b0a6e9 (patch) | |
tree | c2c97ab0fd5f42a5ef3377ec42194665a21b963b /modules/computer/os.c | |
parent | 425b4b20edeb741cd6114cc1c40bd198a9908407 (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/os.c')
-rw-r--r-- | modules/computer/os.c | 2 |
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 |