URI: 
       tlib9: avoid unportable use of d_namlen in dirread - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit c53ad837a734f7570badcb3666ccb3604e7e6467
   DIR parent 587933c16132d880a06ff99bd087e64a3a04975e
  HTML Author: Russ Cox <rsc@swtch.com>
       Date:   Mon, 18 May 2020 17:03:42 -0400
       
       lib9: avoid unportable use of d_namlen in dirread
       
       Fixes #395.
       
       Diffstat:
         M src/lib9/open.c                     |       3 +--
       
       1 file changed, 1 insertion(+), 2 deletions(-)
       ---
   DIR diff --git a/src/lib9/open.c b/src/lib9/open.c
       t@@ -318,8 +318,7 @@ dirreadmax(int fd, Dir **dp, int max)
                                        return -1;
                                break;
                        }
       -                if(de->d_name[de->d_namlen] != 0)
       -                        sysfatal("bad readdir");
       +                // Note: not all systems have d_namlen. Assume NUL-terminated.
                        if(de->d_name[0]=='.' && de->d_name[1]==0)
                                continue;
                        if(de->d_name[0]=='.' && de->d_name[1]=='.' && de->d_name[2]==0)