[patch] libstdc++/67747 Allocate space for dirent::d_name

Jonathan Wakely jwakely@redhat.com
Thu Oct 1 18:38:00 GMT 2015


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.)



More information about the Gcc-patches mailing list