fix: we shall not produce warnings compiling tor

This commit is contained in:
Vinícius Zavam 2022-11-05 20:49:04 +00:00
parent 64f8490ede
commit cc95be8e17
No known key found for this signature in database
GPG Key ID: 415C653413B43475

View File

@ -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) */
}