[perl #127511] v5.23.7-308-g1d41bb7 broke t/op/threads-dirh.t on solaris threaded builds
In other words, skip it if the dirent->d_name is a pointer (char *)
or less (struct-final char d_name[1], as it seems to be in Solaris).
The length sanity check is meant for places where the d_name is
a true array.
Follow-up to
1d41bb72.
pos = PerlDir_tell(dp);
if ((dirent = PerlDir_read(dp))) {
len = d_namlen(dirent);
- if (len > sizeof(dirent->d_name)) {
+ if (len > sizeof(dirent->d_name) && sizeof(dirent->d_name) > PTRSIZE) {
/* If the len is somehow magically longer than the
* maximum length of the directory entry, even though
* we could fit it in a buffer, we could not copy it