Petri Gynther | f151f53 | 2015-08-04 17:38:01 -0700 | [diff] [blame^] | 1 | #include <stdlib.h> |
2 | |||||
3 | #if !defined(__UCLIBC__) | ||||
Ingo Molnar | e12762c | 2013-10-07 10:34:20 +0200 | [diff] [blame] | 4 | #include <gnu/libc-version.h> |
Petri Gynther | f151f53 | 2015-08-04 17:38:01 -0700 | [diff] [blame^] | 5 | #else |
6 | #define XSTR(s) STR(s) | ||||
7 | #define STR(s) #s | ||||
8 | #endif | ||||
Ingo Molnar | e12762c | 2013-10-07 10:34:20 +0200 | [diff] [blame] | 9 | |
10 | int main(void) | ||||
11 | { | ||||
Petri Gynther | f151f53 | 2015-08-04 17:38:01 -0700 | [diff] [blame^] | 12 | #if !defined(__UCLIBC__) |
Ingo Molnar | e12762c | 2013-10-07 10:34:20 +0200 | [diff] [blame] | 13 | const char *version = gnu_get_libc_version(); |
Petri Gynther | f151f53 | 2015-08-04 17:38:01 -0700 | [diff] [blame^] | 14 | #else |
15 | const char *version = XSTR(__GLIBC__) "." XSTR(__GLIBC_MINOR__); | ||||
16 | #endif | ||||
Ingo Molnar | 20c99e8 | 2013-10-07 13:27:23 +0200 | [diff] [blame] | 17 | |
Ingo Molnar | e12762c | 2013-10-07 10:34:20 +0200 | [diff] [blame] | 18 | return (long)version; |
19 | } |