perform proper 'OR' while checking defined vars

* the || is not possible with #ifdef statement;
  * here the #ifdef turns into '#if defined()'.
This commit is contained in:
Vinícius Zavam 2022-11-27 18:41:09 +00:00
parent 4b23bd8c9c
commit 642e56bdb6
No known key found for this signature in database
GPG key ID: 415C653413B43475

View file

@ -31,7 +31,7 @@
const char * const char *
tor_libc_get_name(void) tor_libc_get_name(void)
{ {
#ifdef __BSD_VISIBLE || __NETBSD_SOURCE #if defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE)
return "BSD"; return "BSD";
#endif /* defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE) */ #endif /* defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE) */
#ifdef __GLIBC__ #ifdef __GLIBC__
@ -46,7 +46,7 @@ tor_libc_get_name(void)
const char * const char *
tor_libc_get_version_str(void) tor_libc_get_version_str(void)
{ {
#ifdef __BSD_VISIBLE || __NETBSD_SOURCE #if defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE)
#include <sys/param.h> #include <sys/param.h>
#ifdef __DragonFly_version #ifdef __DragonFly_version
return STR(__DragonFly_version); return STR(__DragonFly_version);