Detect clang in folly/Portability.h
authorYang Chi <yangchi@fb.com>
Thu, 13 Aug 2015 14:58:03 +0000 (07:58 -0700)
committerfacebook-github-bot-9 <folly-bot@fb.com>
Thu, 13 Aug 2015 15:20:31 +0000 (08:20 -0700)
Summary: The fix in D2283221 was specific to a bug in gcc 4.8 but the macro was failing
to filter out clang compilers.

Reviewed By: @yfeldblum

Differential Revision: D2340160

folly/Portability.h

index 5e2eff3d6b31b508578e693ba3b9a2116d9041fb..77baf95ab6cd58583ea013b99944edcde6a008be 100644 (file)
 # endif
 #endif
 
-#if defined(__GNUC__) && !__GNUC_PREREQ(4,9)
+#if defined(__GNUC__) && !defined(__APPLE__) && !__GNUC_PREREQ(4,9)
 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56019
 // gcc 4.8.x incorrectly placed max_align_t in the root namespace
 // Alias it into std (where it's found in 4.9 and later)