diff options
author | Jo Shields <jo.shields@xamarin.com> | 2014-07-31 13:26:34 +0400 |
---|---|---|
committer | Jo Shields <jo.shields@xamarin.com> | 2014-07-31 14:44:51 +0400 |
commit | 1f513847b28b34ddf42719faac8cae4b562e70ff (patch) | |
tree | e772afca65d49f855a75709dc50414c4df89169d /libgc/dyn_load.c | |
parent | 303e42b130beac49a29868a8fcadaf42c598812f (diff) |
Support for GNU/kFreeBSD.
GNU/kFreeBSD is an experimental OS provided by the Debian project, consisting
of a FreeBSD kernel and GNU userland/libc. For a small number of cases, this
offers advantages over a more common GNU/Linux combination, such as fast
in-kernel support for ZFS storage.
This patch changes various ifdefs, either using __FreeBSD_kernel__ where a
trait from the kernel is what matters, or __GLIBC__ where a trait from the
C library matters.
This patch set has been carried downstream, in one form or another, since
1.2.3.1-1.
https://bugzilla.novell.com/show_bug.cgi?id=321634
Diffstat (limited to 'libgc/dyn_load.c')
-rw-r--r-- | libgc/dyn_load.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgc/dyn_load.c b/libgc/dyn_load.c index ca7ce54f194..5db3503aacb 100644 --- a/libgc/dyn_load.c +++ b/libgc/dyn_load.c @@ -26,7 +26,7 @@ * None of this is safe with dlclose and incremental collection. * But then not much of anything is safe in the presence of dlclose. */ -#if (defined(__linux__) || defined(__native_client__)) && !defined(_GNU_SOURCE) +#if (defined(__linux__) || defined(__GLIBC__) || defined(__native_client__)) && !defined(_GNU_SOURCE) /* Can't test LINUX, since this must be define before other includes */ # define _GNU_SOURCE #endif @@ -394,7 +394,7 @@ GC_bool GC_register_main_static_data() /* For glibc 2.2.4+. Unfortunately, it doesn't work for older */ /* versions. Thanks to Jakub Jelinek for most of the code. */ -# if (defined(LINUX) || defined(NACL)) /* Are others OK here, too? */ \ +# if (defined(LINUX) || defined (__GLIBC__) || defined(NACL)) /* Are others OK here, too? */ \ && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) |