aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorVinícius Zavam <egypcio@googlemail.com>2022-11-05 18:17:12 +0000
committerVinícius Zavam <egypcio@googlemail.com>2022-11-05 18:17:12 +0000
commitdba3090a682cbb47d60a44f273c186f668e7d9b7 (patch)
tree8a10f5be9d88f78e4c7ece12299f200be821e3b0 /src/lib
parent863428d753008f0e8bee56c8fb468dd9aed9f15c (diff)
downloadtor-dba3090a682cbb47d60a44f273c186f668e7d9b7.tar.gz
tor-dba3090a682cbb47d60a44f273c186f668e7d9b7.zip
return BSD if tor_libc_get_name sees __BSD_VISIBLE
* __BSD_VISIBLE is defined by systems like FreeBSD and OpenBSD; * that also extends to DragonFlyBSD; * it's used on stdlib.h and ctypes.h on those systems.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/osinfo/libc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c
index f52dea41aa..59a49e5e63 100644
--- a/src/lib/osinfo/libc.c
+++ b/src/lib/osinfo/libc.c
@@ -31,6 +31,9 @@
const char *
tor_libc_get_name(void)
{
+#ifdef __BSD_VISIBLE
+ return "BSD";
+#endif /* defined(__BSD_VISIBLE) */
#ifdef __GLIBC__
return "Glibc";
#else /* !defined(__GLIBC__) */