This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] libstdc++/67747 Allocate space for dirent::d_name
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Oct 2015 19:38:21 +0100
- Subject: Re: [patch] libstdc++/67747 Allocate space for dirent::d_name
- Authentication-results: sourceware.org; auth=none
- References: <20150929113726 dot GU12094 at redhat dot com> <560ADE6F dot 30104 at gmail dot com> <20150930110110 dot GD12094 at redhat dot com> <560C000B dot 7020009 at gmail dot com> <20151001172337 dot GI12094 at redhat dot com>
On 01/10/15 18:23 +0100, Jonathan Wakely wrote:
+ struct op_delete {
+ void operator()(void* p) const { ::operator delete(p); }
+ };
+ std::unique_ptr<::dirent*, op_delete> ptr;
Oops, that should be dirent not dirent* i.e.
std::unique_ptr<::dirent, op_delete> ptr;
(Found on AIX, where NAME_MAX isn't defined.)