mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge branch 'tor-gitlab/mr/652'
This commit is contained in:
commit
21121eb231
3
changes/bsd_libc
Normal file
3
changes/bsd_libc
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor bugfixes (compilation):
|
||||
- Fix returning something other than "Unknown N/A" as libc version if we
|
||||
build tor on an O.S. like DragonFlyBSD, FreeBSD, OpenBSD or NetBSD.
|
@ -31,6 +31,9 @@
|
||||
const char *
|
||||
tor_libc_get_name(void)
|
||||
{
|
||||
#if defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE)
|
||||
return "BSD";
|
||||
#endif /* defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE) */
|
||||
#ifdef __GLIBC__
|
||||
return "Glibc";
|
||||
#else /* !defined(__GLIBC__) */
|
||||
@ -43,6 +46,21 @@ tor_libc_get_name(void)
|
||||
const char *
|
||||
tor_libc_get_version_str(void)
|
||||
{
|
||||
#if defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE)
|
||||
#include <sys/param.h>
|
||||
#ifdef __DragonFly_version
|
||||
return STR(__DragonFly_version);
|
||||
#endif
|
||||
#ifdef __FreeBSD__
|
||||
return STR(__FreeBSD_version);
|
||||
#endif
|
||||
#ifdef __NetBSD_Version__
|
||||
return STR(__NetBSD_Version__);
|
||||
#endif
|
||||
#ifdef OpenBSD
|
||||
return STR(OpenBSD);
|
||||
#endif
|
||||
#endif /* defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE) */
|
||||
#ifdef CHECK_LIBC_VERSION
|
||||
const char *version = gnu_get_libc_version();
|
||||
if (version == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user