diff options
author | VinÃcius Zavam <egypcio@googlemail.com> | 2022-11-05 20:49:04 +0000 |
---|---|---|
committer | VinÃcius Zavam <egypcio@googlemail.com> | 2022-11-05 20:49:04 +0000 |
commit | cc95be8e1735344ad40f7d4420aca63b54f44f2a (patch) | |
tree | b197a2dd34db2146b7f7063789ea973c6294eeb2 /src/lib | |
parent | 64f8490ede1ecab2b36bdc7cf639f0561b6be2c3 (diff) | |
download | tor-cc95be8e1735344ad40f7d4420aca63b54f44f2a.tar.gz tor-cc95be8e1735344ad40f7d4420aca63b54f44f2a.zip |
fix: we shall not produce warnings compiling tor
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/osinfo/libc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c index d3050fccdb..47f667d564 100644 --- a/src/lib/osinfo/libc.c +++ b/src/lib/osinfo/libc.c @@ -46,12 +46,6 @@ tor_libc_get_name(void) const char * tor_libc_get_version_str(void) { -#ifdef CHECK_LIBC_VERSION - const char *version = gnu_get_libc_version(); - if (version == NULL) - return "N/A"; - return version; -#else /* !defined(CHECK_LIBC_VERSION) */ #ifdef __BSD_VISIBLE #include <sys/param.sh> #ifdef __DragonFly_version @@ -65,7 +59,14 @@ tor_libc_get_version_str(void) #endif #ifdef OpenBSD return STR(OpenBSD); +#endif #endif /* defined(__BSD_VISIBLE) */ +#ifdef CHECK_LIBC_VERSION + const char *version = gnu_get_libc_version(); + if (version == NULL) + return "N/A"; + return version; +#else /* !defined(CHECK_LIBC_VERSION) */ return "N/A"; #endif /* defined(CHECK_LIBC_VERSION) */ } |