From c98ec6d00157c7114d1e09e8da39110140809ab9 Mon Sep 17 00:00:00 2001 From: Vinícius Zavam Date: Sat, 5 Nov 2022 18:38:04 +0000 Subject: 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 --- src/lib/osinfo/libc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/lib/osinfo/libc.c') diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c index 19d089026c..4af8e2f413 100644 --- a/src/lib/osinfo/libc.c +++ b/src/lib/osinfo/libc.c @@ -55,8 +55,11 @@ tor_libc_get_version_str(void) #ifdef __BSD_VISIBLE #include #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) */ } -- cgit v1.2.3-54-g00ecf