Created attachment 169757 [details]
Don't declare max_align_t if libc++'s stddef.h already did it
During the exp-run in bug 208158, it was found that security/hpenc gives errors with libc++ 3.8.0 :
In file included from aead.cc:29:
In file included from ./aead.h:29:
./common.h:37:3: error: typedef redefinition with different types ('struct max_align_t' vs 'long double')
/usr/include/c++/v1/stddef.h:57:21: note: previous definition is here
typedef long double max_align_t;
If __CLANG_MAX_ALIGN_T_DEFINED is not defined, libc++'s new stddef.h also declares max_align_t, and this conflicts with the max_align_t declaration in common.h. There is already an "Ugly, ugly hack" part in common.h, which unfortunately must now be made even uglier, as in the attached patch. This adds a !defined(_LIBCPP_STDDEF_H) to detect whether libc++'s stddef.h was included.
A commit references this bug:
Date: Fri Apr 29 15:41:40 UTC 2016
New revision: 414279
- Fix build with the recent libc++
Submitted by: dim
Committe, thank you!