diff options
author | Aliaksey Kandratsenka <alkondratenko@gmail.com> | 2017-05-14 20:24:27 -0700 |
---|---|---|
committer | Aliaksey Kandratsenka <alkondratenko@gmail.com> | 2017-05-14 20:35:22 -0700 |
commit | 53f15325d93fbe0ba17bb3fac3da86ffd3f0f1ad (patch) | |
tree | a6c7e445953d94d030db4a73c054941bc7105fab /src/tests/tcmalloc_unittest.cc | |
parent | b1d88662cb4a38ee47aa48076745898033526f9d (diff) | |
download | gperftools-53f15325d93fbe0ba17bb3fac3da86ffd3f0f1ad.tar.gz |
fix compilation of tcmalloc_unittest.cc on older llvm-gcc
Diffstat (limited to 'src/tests/tcmalloc_unittest.cc')
-rw-r--r-- | src/tests/tcmalloc_unittest.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/tcmalloc_unittest.cc b/src/tests/tcmalloc_unittest.cc index 0bf18e7..712cb1b 100644 --- a/src/tests/tcmalloc_unittest.cc +++ b/src/tests/tcmalloc_unittest.cc @@ -1079,8 +1079,14 @@ struct GlobalNallocx { #if defined(__GNUC__) +#if defined(__APPLE__) +// llvm-gcc on older osex that I have access to, doesn't like arg-ful +// constructor attribute. +static void check_global_nallocx() __attribute__((constructor)); +#else // 101 is the max user priority. static void check_global_nallocx() __attribute__((constructor(101))); +#endif static void check_global_nallocx() { CHECK_GT(nallocx(99, 0), 99); } #endif // __GNUC__ |