[tor-commits] [tor] 03/11: return what OpenBSD gives as base system version

gitolite role git at cupani.torproject.org
Mon Nov 28 14:39:36 UTC 2022


This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository tor.

commit c98ec6d00157c7114d1e09e8da39110140809ab9
Author: Vinícius Zavam <egypcio at googlemail.com>
AuthorDate: Sat Nov 5 18:38:04 2022 +0000

    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(-)

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 <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) */
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list