From: Vinícius Zavam Date: Sat, 5 Nov 2022 18:31:46 +0000 (+0000) Subject: should we identify __FreeBSD__, return its version X-Git-Tag: tor-0.4.8.1-alpha~192^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9c7f919d6ff71f3c0ec227ab89b017465124055a;p=thirdparty%2Ftor.git should we identify __FreeBSD__, return its version * we use OSVERSION here (defined by __FreeBSD__); * it's part of the include; * that tracks all noteworthy changes made to the base system. --- 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 +#ifdef __FreeBSD__ + return STR(__FreeBSD__); +#endif return "N/A"; #endif /* defined(CHECK_LIBC_VERSION) */ }