[tor-commits] [tor] 07/11: fix: we shall not produce warnings compiling tor

gitolite role git at cupani.torproject.org
Mon Nov 28 14:39:40 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 cc95be8e1735344ad40f7d4420aca63b54f44f2a
Author: Vinícius Zavam <egypcio at googlemail.com>
AuthorDate: Sat Nov 5 20:49:04 2022 +0000

    fix: we shall not produce warnings compiling tor
---
 src/lib/osinfo/libc.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c
index d3050fccdb..47f667d564 100644
--- a/src/lib/osinfo/libc.c
+++ b/src/lib/osinfo/libc.c
@@ -46,12 +46,6 @@ tor_libc_get_name(void)
 const char *
 tor_libc_get_version_str(void)
 {
-#ifdef CHECK_LIBC_VERSION
-  const char *version = gnu_get_libc_version();
-  if (version == NULL)
-    return "N/A";
-  return version;
-#else /* !defined(CHECK_LIBC_VERSION) */
 #ifdef __BSD_VISIBLE
 #include <sys/param.sh>
 #ifdef __DragonFly_version
@@ -65,7 +59,14 @@ tor_libc_get_version_str(void)
 #endif
 #ifdef OpenBSD
   return STR(OpenBSD);
+#endif
 #endif /* defined(__BSD_VISIBLE) */
+#ifdef CHECK_LIBC_VERSION
+  const char *version = gnu_get_libc_version();
+  if (version == NULL)
+    return "N/A";
+  return version;
+#else /* !defined(CHECK_LIBC_VERSION) */
   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