diff options
author | jperkin <jperkin@pkgsrc.org> | 2017-05-12 18:10:56 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2017-05-12 18:10:56 +0000 |
commit | 46cf15fdb604dfad30f28ab1996df528a70a5fe1 (patch) | |
tree | eeea3eb2c2b4b75836d58237a26a9f20612bf695 /lang/gcc7/patches | |
parent | 435e651e0bfa7b4273391fef12519f58b03de2d6 (diff) | |
download | pkgsrc-46cf15fdb604dfad30f28ab1996df528a70a5fe1.tar.gz |
Restrict patch to specific circumstances on SunOS.
Diffstat (limited to 'lang/gcc7/patches')
-rw-r--r-- | lang/gcc7/patches/patch-libstdc++-v3_libsupc++_new__opa.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lang/gcc7/patches/patch-libstdc++-v3_libsupc++_new__opa.cc b/lang/gcc7/patches/patch-libstdc++-v3_libsupc++_new__opa.cc index 16ffaf9553c..90f451a4995 100644 --- a/lang/gcc7/patches/patch-libstdc++-v3_libsupc++_new__opa.cc +++ b/lang/gcc7/patches/patch-libstdc++-v3_libsupc++_new__opa.cc @@ -1,15 +1,17 @@ -$NetBSD: patch-libstdc++-v3_libsupc++_new__opa.cc,v 1.1 2017/05/10 15:00:09 jperkin Exp $ +$NetBSD: patch-libstdc++-v3_libsupc++_new__opa.cc,v 1.2 2017/05/12 18:10:56 jperkin Exp $ -Ensure we can find std::aligned_alloc if using it. +Ensure we can find SunOS std::aligned_alloc if using it. --- libstdc++-v3/libsupc++/new_opa.cc.orig 2017-01-26 14:30:45.000000000 +0000 +++ libstdc++-v3/libsupc++/new_opa.cc -@@ -82,6 +82,8 @@ aligned_alloc (std::size_t al, std::size - return aligned_ptr; - } - #endif -+#else -+using std::aligned_alloc; - #endif +@@ -31,6 +31,10 @@ + using std::new_handler; + using std::bad_alloc; - _GLIBCXX_WEAK_DEFINITION void * ++#if defined(__sun) && _GLIBCXX_HAVE_ALIGNED_ALLOC ++using std::aligned_alloc; ++#endif ++ + #if !_GLIBCXX_HAVE_ALIGNED_ALLOC + #if _GLIBCXX_HAVE__ALIGNED_MALLOC + #define aligned_alloc(al,sz) _aligned_malloc(sz,al) |