should we identify __FreeBSD__, return its version

* we use OSVERSION here (defined by __FreeBSD__);
  * it's part of the <sys/param.h> include;
  * that tracks all noteworthy changes made to the base system.
This commit is contained in:
Vinícius Zavam 2022-11-05 18:31:46 +00:00
parent dba3090a68
commit 9c7f919d6f
No known key found for this signature in database
GPG Key ID: 415C653413B43475

View File

@ -52,6 +52,11 @@ tor_libc_get_version_str(void)
return "N/A"; return "N/A";
return version; return version;
#else /* !defined(CHECK_LIBC_VERSION) */ #else /* !defined(CHECK_LIBC_VERSION) */
#ifdef __BSD_VISIBLE
#include <sys/param.sh>
#ifdef __FreeBSD__
return STR(__FreeBSD__);
#endif
return "N/A"; return "N/A";
#endif /* defined(CHECK_LIBC_VERSION) */ #endif /* defined(CHECK_LIBC_VERSION) */
} }