]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | // SPDX-License-Identifier: GPL-2.0 |
f151f53a PG |
2 | #include <stdlib.h> |
3 | ||
4 | #if !defined(__UCLIBC__) | |
e12762cf | 5 | #include <gnu/libc-version.h> |
f151f53a PG |
6 | #else |
7 | #define XSTR(s) STR(s) | |
8 | #define STR(s) #s | |
9 | #endif | |
e12762cf IM |
10 | |
11 | int main(void) | |
12 | { | |
f151f53a | 13 | #if !defined(__UCLIBC__) |
e12762cf | 14 | const char *version = gnu_get_libc_version(); |
f151f53a PG |
15 | #else |
16 | const char *version = XSTR(__GLIBC__) "." XSTR(__GLIBC_MINOR__); | |
17 | #endif | |
20c99e82 | 18 | |
e12762cf IM |
19 | return (long)version; |
20 | } |