return what OpenBSD gives as base system version

* it also uses sys/param.h to track its version;
  * present that to tor_libc_get_version_str() as libc version;

  while here, we also fix the return of FreeBSD version

  * __FreeBSD_version is the correct var tracking the OSVERSION
This commit is contained in:
Vinícius Zavam 2022-11-05 18:38:04 +00:00
parent 9c7f919d6f
commit c98ec6d001
No known key found for this signature in database
GPG key ID: 415C653413B43475

View file

@ -55,8 +55,11 @@ tor_libc_get_version_str(void)
#ifdef __BSD_VISIBLE
#include <sys/param.sh>
#ifdef __FreeBSD__
return STR(__FreeBSD__);
return STR(__FreeBSD_version);
#endif
#ifdef OpenBSD
return STR(OpenBSD);
#endif /* defined(__BSD_VISIBLE) */
return "N/A";
#endif /* defined(CHECK_LIBC_VERSION) */
}