mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Fix detection of the __has_attribute() for apple clang [ci skip]
Fixes build on the next osx env: - Mac OS 10.9/clang 600 - Mac OS 10.8/clang 500 Refs: https://github.com/libevent/libevent/issues/447#issuecomment-497908488 (cherry picked from commit 7d569b0fafe76e9036695ccc9d22d2195c214bce)
This commit is contained in:
parent
a8a04565b1
commit
7fd7c5eff3
@ -52,16 +52,22 @@ extern "C" {
|
||||
|
||||
/* __has_attribute() wrapper */
|
||||
#ifdef __has_attribute
|
||||
#define EVUTIL_HAS_ATTRIBUTE __has_attribute
|
||||
# define EVUTIL_HAS_ATTRIBUTE __has_attribute
|
||||
#endif
|
||||
/** clang 3 __has_attribute misbehaves in some versions */
|
||||
#if defined(__clang__) && \
|
||||
__clang__ == 1 && __clang_major__ == 3 && \
|
||||
(__clang_minor__ >= 2 && __clang_minor__ <= 5)
|
||||
#undef EVUTIL_HAS_ATTRIBUTE
|
||||
#endif
|
||||
#if defined(__clang__) && __clang__ == 1
|
||||
# if defined(__apple_build_version__)
|
||||
# if __clang_major__ <= 6
|
||||
# undef EVUTIL_HAS_ATTRIBUTE
|
||||
# endif
|
||||
# else /* !__apple_build_version__ */
|
||||
# if __clang_major__ == 3 && __clang_minor__ >= 2 && __clang_minor__ <= 5
|
||||
# undef EVUTIL_HAS_ATTRIBUTE
|
||||
# endif
|
||||
# endif /* __apple_build_version__ */
|
||||
#endif /*\ defined(__clang__) && __clang__ == 1 */
|
||||
#ifndef EVUTIL_HAS_ATTRIBUTE
|
||||
#define EVUTIL_HAS_ATTRIBUTE(x) 0
|
||||
# define EVUTIL_HAS_ATTRIBUTE(x) 0
|
||||
#endif
|
||||
|
||||
/* If we need magic to say "inline", get it for free internally. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user