diff options
author | VinÃcius Zavam <egypcio@googlemail.com> | 2022-11-05 18:31:46 +0000 |
---|---|---|
committer | VinÃcius Zavam <egypcio@googlemail.com> | 2022-11-05 18:31:46 +0000 |
commit | 9c7f919d6ff71f3c0ec227ab89b017465124055a (patch) | |
tree | dd51744df915de88c23030743f551f386da989df /src/lib/osinfo | |
parent | dba3090a682cbb47d60a44f273c186f668e7d9b7 (diff) | |
download | tor-9c7f919d6ff71f3c0ec227ab89b017465124055a.tar.gz tor-9c7f919d6ff71f3c0ec227ab89b017465124055a.zip |
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.
Diffstat (limited to 'src/lib/osinfo')
-rw-r--r-- | src/lib/osinfo/libc.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) */ } |