commit 642e56bdb640150804286d1c60fdae36796bc14b
parent 4b23bd8c9c3d386c45a0e9406e8a926a47b4992c
Author: VinÃcius Zavam <egypcio@googlemail.com>
Date: Sun, 27 Nov 2022 18:41:09 +0000
perform proper 'OR' while checking defined vars
* the || is not possible with #ifdef statement;
* here the #ifdef turns into '#if defined()'.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c
@@ -31,7 +31,7 @@
const char *
tor_libc_get_name(void)
{
-#ifdef __BSD_VISIBLE || __NETBSD_SOURCE
+#if defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE)
return "BSD";
#endif /* defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE) */
#ifdef __GLIBC__
@@ -46,7 +46,7 @@ tor_libc_get_name(void)
const char *
tor_libc_get_version_str(void)
{
-#ifdef __BSD_VISIBLE || __NETBSD_SOURCE
+#if defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE)
#include <sys/param.h>
#ifdef __DragonFly_version
return STR(__DragonFly_version);