This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit 9c7f919d6ff71f3c0ec227ab89b017465124055a Author: VinÃcius Zavam egypcio@googlemail.com AuthorDate: Sat Nov 5 18:31:46 2022 +0000
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. --- src/lib/osinfo/libc.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c index 59a49e5e63..19d089026c 100644 --- a/src/lib/osinfo/libc.c +++ b/src/lib/osinfo/libc.c @@ -52,6 +52,11 @@ tor_libc_get_version_str(void) return "N/A"; return version; #else /* !defined(CHECK_LIBC_VERSION) */ +#ifdef __BSD_VISIBLE +#include <sys/param.sh> +#ifdef __FreeBSD__ + return STR(__FreeBSD__); +#endif return "N/A"; #endif /* defined(CHECK_LIBC_VERSION) */ }