mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Fix compilation errors for FreeBSD
Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
parent
554d840742
commit
c3bc04e355
3
changes/ticket40825
Normal file
3
changes/ticket40825
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
o Minor bugfix (FreeBSD, compilation):
|
||||||
|
- Fix compilation issue on FreeBSD by properly importing sys/param.h. Fixes
|
||||||
|
bug 40825; bugfix on 0.4.8.1-alpha.
|
@ -26,6 +26,10 @@
|
|||||||
#define STR_IMPL(x) #x
|
#define STR_IMPL(x) #x
|
||||||
#define STR(x) STR_IMPL(x)
|
#define STR(x) STR_IMPL(x)
|
||||||
|
|
||||||
|
#if defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE)
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif /* defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE) */
|
||||||
|
|
||||||
/** Return the name of the compile time libc. Returns NULL if we
|
/** Return the name of the compile time libc. Returns NULL if we
|
||||||
* cannot identify the libc. */
|
* cannot identify the libc. */
|
||||||
const char *
|
const char *
|
||||||
@ -46,8 +50,6 @@ tor_libc_get_name(void)
|
|||||||
const char *
|
const char *
|
||||||
tor_libc_get_version_str(void)
|
tor_libc_get_version_str(void)
|
||||||
{
|
{
|
||||||
#if defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE)
|
|
||||||
#include <sys/param.h>
|
|
||||||
#ifdef __DragonFly_version
|
#ifdef __DragonFly_version
|
||||||
return STR(__DragonFly_version);
|
return STR(__DragonFly_version);
|
||||||
#endif
|
#endif
|
||||||
@ -60,7 +62,6 @@ tor_libc_get_version_str(void)
|
|||||||
#ifdef OpenBSD
|
#ifdef OpenBSD
|
||||||
return STR(OpenBSD);
|
return STR(OpenBSD);
|
||||||
#endif
|
#endif
|
||||||
#endif /* defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE) */
|
|
||||||
#ifdef CHECK_LIBC_VERSION
|
#ifdef CHECK_LIBC_VERSION
|
||||||
const char *version = gnu_get_libc_version();
|
const char *version = gnu_get_libc_version();
|
||||||
if (version == NULL)
|
if (version == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user